From 7d249c573faec701e7368fcf3bfe0c531af70fc8 Mon Sep 17 00:00:00 2001 From: Vivek R Date: Sat, 20 Apr 2019 14:11:54 +0530 Subject: fix: allow disqus field in content to onveride site params --- layouts/_default/single.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index beee7b7..72569ba 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -15,12 +15,15 @@ {{- $.Scratch.Set "isDisqus" true -}} - {{- if and (isset .Params "disqus") (eq .Params.disabledisqus false) -}} + + {{- if and (isset .Params "type") (in (.Site.Params.disableDisqusTypes | default (slice "page")) .Params.type) -}} {{- $.Scratch.Set "isDisqus" false -}} {{- end -}} - {{- if and (isset .Params "type") (in (.Site.Params.disableDisqusTypes | default (slice "page")) .Params.type) -}} + {{- if and (isset .Params "disqus") (eq .Params.disqus false) -}} {{- $.Scratch.Set "isDisqus" false -}} + {{- else if and (isset .Params "disqus") (eq .Params.disqus true) -}} + {{- $.Scratch.Set "isDisqus" true -}} {{- end -}} {{- if eq ($.Scratch.Get "isDisqus") true -}} -- cgit v1.2.3