fix: allow disqus field in content to onveride site params
This commit is contained in:
parent
80353300b3
commit
7d249c573f
@ -15,14 +15,17 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- $.Scratch.Set "isDisqus" true -}}
|
{{- $.Scratch.Set "isDisqus" true -}}
|
||||||
{{- if and (isset .Params "disqus") (eq .Params.disabledisqus false) -}}
|
|
||||||
{{- $.Scratch.Set "isDisqus" false -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- if and (isset .Params "type") (in (.Site.Params.disableDisqusTypes | default (slice "page")) .Params.type) -}}
|
{{- if and (isset .Params "type") (in (.Site.Params.disableDisqusTypes | default (slice "page")) .Params.type) -}}
|
||||||
{{- $.Scratch.Set "isDisqus" false -}}
|
{{- $.Scratch.Set "isDisqus" false -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- 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 -}}
|
{{- if eq ($.Scratch.Get "isDisqus") true -}}
|
||||||
{{- partial "disqus.html" . -}}
|
{{- partial "disqus.html" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user