From f11691355ae9bd4dddf1f0ee3621d9064aaace6e Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Thu, 18 Jun 2020 14:29:11 +0800 Subject: Optimize comment area setting logic --- layouts/_default/single.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'layouts/_default') 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 @@ {{ 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 -- cgit v1.2.3