Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cntrump/hugo-notepadium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author94xychen <94xychen@gmail.com>2020-04-02 17:42:40 +0300
committerGitHub <noreply@github.com>2020-04-02 17:42:40 +0300
commit2d86df4cf8426c662cb4271df73d4de394dfb8a5 (patch)
treecf93eabe5c807ab6e58cb9232377e93c32a5bf4a /layouts
parent3e052557d314f8cd284d66d6f43114a186e69264 (diff)
Make this component compatible with the old config.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/article-share.html5
1 files changed, 2 insertions, 3 deletions
diff --git a/layouts/partials/article-share.html b/layouts/partials/article-share.html
index 95f6e27..2312088 100644
--- a/layouts/partials/article-share.html
+++ b/layouts/partials/article-share.html
@@ -1,6 +1,5 @@
-{{- $addThisId := site.Params.share.addThisId -}}
-{{- if gt (len $addThisId) 0 -}}
- {{- if or (eq .Params.share true) (and (ne .Params.share false) (eq site.Params.share.enable true)) -}}
+{{- if or (eq .Params.share true) (and (ne .Params.share false) (eq site.Params.share.enable true)) -}}
+ {{- if gt (len site.Params.share.addThisId) 0 -}}
{{- $inlineToolId := site.Params.share.inlineToolId -}}
<div class="article share addthis_inline_share_toolbox{{- if gt (len $inlineToolId) 0 -}}{{- print "_" $inlineToolId -}}{{- end -}}"></div>
{{- $js := resources.Get "js/addthis_widget.js" | resources.Minify | resources.Fingerprint "sha384" -}}