From 72d5c94cc506c333365a5f5e7f5ead3c1e2add26 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 18 Sep 2016 17:11:08 +0300 Subject: [PATCH] Add basic sharing icons to the bottom of posts By default they are on, but you can disable them by adding the following configuration value: [params.sharingicons] hide = true If this parameter is undefined (or "false") then the icons will be shown. Furthermore, you can disable specific icons by setting their value to "false", ie: [params.sharingicons] facebook = false Any icons not named will be shown. Currently there a four icons configureg: facebook, googleplus, linkedin, and twitter. --- layouts/_default/single.html | 4 ++++ layouts/partials/sharing-icons.html | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 layouts/partials/sharing-icons.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 09ae91e..130a81a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,5 +6,9 @@

by {{ .Params.author | default .Site.Params.author }}

{{ .Content }} + + {{ if not .Site.Params.sharingicons.hide }} + {{ partial "sharing-icons.html" . }} + {{ end }} {{ end }} diff --git a/layouts/partials/sharing-icons.html b/layouts/partials/sharing-icons.html new file mode 100644 index 0000000..2212d05 --- /dev/null +++ b/layouts/partials/sharing-icons.html @@ -0,0 +1,13 @@ +
+ +