summaryrefslogtreecommitdiffstats
path: root/layouts/_default/single.html
diff options
context:
space:
mode:
authoramzrk22020-06-18 14:29:11 +0800
committeramzrk22020-06-18 14:29:11 +0800
commitf11691355ae9bd4dddf1f0ee3621d9064aaace6e (patch)
tree44157bea00f5b7ae0959d083f4237b0c730aacf7 /layouts/_default/single.html
parent5c68750e0cd265464aa55b1f1d89e54f7e71ccc0 (diff)
downloadhugo-theme-fuji-f11691355ae9bd4dddf1f0ee3621d9064aaace6e.tar.gz
hugo-theme-fuji-f11691355ae9bd4dddf1f0ee3621d9064aaace6e.tar.bz2
hugo-theme-fuji-f11691355ae9bd4dddf1f0ee3621d9064aaace6e.zip
Optimize comment area setting logic
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r--layouts/_default/single.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 26a8213..8f7eb35 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -24,11 +24,11 @@
</blockquote>
</div>
{{ end }}
-{{ if .Site.Params.disqusJSApi }}
+{{ if and (.Site.Params.disqusJSApi) (ne .Params.showComments false) }}
{{ partial "comment-disqusjs.html" . }}
-{{ else if .Site.Params.disqusShortname }}
+{{ else if and (.Site.Params.disqusShortname) (ne .Params.showComments false) }}
{{ partial "comment-disqus.html" . }}
-{{ else if .Site.Params.utterancesRepo }}
+{{ else if and (.Site.Params.utterancesRepo) (ne .Params.showComments false) }}
{{ partial "comment-utterances.html" . }}
{{ else }}{{ end }}
{{ end }} \ No newline at end of file