Browse Source

Disable disqus templates if DisqusShortname is not set

If the Disqus shortname isn't set then the user obviously doesn't want to use
disqus, so skip the template entirely.
pull/6/head
Ross Burton 4 years ago
parent
commit
4d69df10a8
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      layouts/_default/single.html

+ 2
- 0
layouts/_default/single.html View File

@@ -36,6 +36,7 @@
{{ end }}
</div>

{{- if .Site.DisqusShortname -}}
{{- $.Scratch.Set "isDisqus" true -}}

{{- if and (isset .Params "type") (in .Site.Params.disableDisqusTypes .Params.type) -}}
@@ -51,6 +52,7 @@
{{- if eq ($.Scratch.Get "isDisqus") true -}}
{{- partial "disqus.html" . -}}
{{- end -}}
{{- end -}}
</div>
</div>
{{ partial "footer.html" . }}

Loading…
Cancel
Save