From 2459ad9567e834c2370f3f8bae88b3dea97bf610 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sat, 21 Jan 2017 19:16:57 +0200 Subject: [PATCH] layouts/_default/single.html: Simplify sharing icon logic Allowing users to select specific icons they want to show makes the configuration and logic a bit tricky. A user brought up the case of disabling sharing icons on certain pages/posts, and it was actaully not possible without adding lots of extra logic, not to mention the pain of having to test all possible configurations. Instead, it is much simpler to just allow sharing icons to be either on or off as desired in the site config or page/post frontmatter: sharingicons = false Otherwise, sharing icons default to being enabled, as this is most in line with what would be expected on a "blog". --- layouts/_default/single.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index f8a628b..0543fc0 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -66,11 +66,11 @@ {{ end }} - {{ if or (not .Site.Params.sharingicons.hide) (.Site.DisqusShortname) }} + {{ if or (ne ($.Param "sharingicons") false) (.Site.DisqusShortname) }}