From 02488109125a50bc92bb46d74ab3c0c2e1f132b2 Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Tue, 10 Oct 2017 19:50:12 -0700 Subject: [PATCH] Allow a post or about page to disable comments --- layouts/_default/single.html | 8 ++++++-- layouts/section/about.html | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4d65570..1b15735 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -40,11 +40,15 @@ {{ end }} {{ if .Site.Params.enableDisqus }} - {{ partial "disqus.html" . }} + {{ if eq .Params.disabledisqus "true" }} + {{ partial "disqus.html" . }} + {{ end }} {{ end }} {{ if .Site.Params.enableDuoshuo }} - {{ partial "duoshuo.html" . }} + {{ if eq .Params.disableduoshuo "true" }} + {{ partial "duoshuo.html" . }} + {{ end }} {{ end }} {{ partial "footer.html" . }} diff --git a/layouts/section/about.html b/layouts/section/about.html index 7e99c5f..8cfc519 100644 --- a/layouts/section/about.html +++ b/layouts/section/about.html @@ -7,11 +7,15 @@ {{ .Content }} {{ if .Site.Params.enableDisqus }} - {{ partial "disqus.html" . }} + {{ if eq .Params.disabledisqus "true" }} + {{ partial "disqus.html" . }} + {{ end }} {{ end }} {{ if .Site.Params.enableDuoshuo }} - {{ partial "duoshuo.html" . }} + {{ if eq .Params.disableduoshuo "true" }} + {{ partial "duoshuo.html" . }} + {{ end }} {{ end }} {{ partial "footer.html" . }}