mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-11-16 01:07:03 +01:00
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".
This commit is contained in:
parent
8ab05ae625
commit
2459ad9567
@ -66,11 +66,11 @@
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
{{ if or (not .Site.Params.sharingicons.hide) (.Site.DisqusShortname) }}
|
||||
{{ if or (ne ($.Param "sharingicons") false) (.Site.DisqusShortname) }}
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
{{ if not .Site.Params.sharingicons.hide }}
|
||||
{{ if (ne ($.Param "sharingicons") false) }}
|
||||
{{ partial "sharing-icons.html" . }}
|
||||
{{ end }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user