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

github.com/vividvilla/ezhil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek R <vividvilla@gmail.com>2019-04-20 11:41:54 +0300
committerVivek R <vividvilla@gmail.com>2019-04-20 11:41:54 +0300
commit7d249c573faec701e7368fcf3bfe0c531af70fc8 (patch)
treece4342c9b991eabe2ae04b6b54b1ef113a04b741
parent80353300b3898a56bf2f1b9dd7bc5f679c0f805e (diff)
fix: allow disqus field in content to onveride site params
-rw-r--r--layouts/_default/single.html7
1 files 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 @@
</div>
{{- $.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 -}}