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

github.com/cntrump/hugo-notepadium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMetalblueberry <metalblueberry@gmail.com>2020-04-10 15:05:05 +0300
committerMetalblueberry <metalblueberry@gmail.com>2020-04-10 15:05:05 +0300
commit87ef2aba8d5409ad9e277ad273a9d089e98c2ecc (patch)
tree9cc301214ab6be0cc14aceb988ada3668e40034f /layouts
parent53535211cd874c9a2ee10feb2251c2445b07cf4f (diff)
ensure discuss and utterances cannot be enabled at the same time
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/article-comments.html15
1 files changed, 6 insertions, 9 deletions
diff --git a/layouts/partials/article-comments.html b/layouts/partials/article-comments.html
index d81ba2f..acea37a 100644
--- a/layouts/partials/article-comments.html
+++ b/layouts/partials/article-comments.html
@@ -1,12 +1,8 @@
-{{- if gt (len site.DisqusShortname) 0 -}}
- {{- if or (eq .Params.comments true) (and (ne .Params.comments false) (eq site.Params.comments.enable true)) -}}
- <section class="article discussion">
- {{- template "_internal/disqus.html" . -}}
- </section>
- {{- end -}}
-{{- end -}}
-{{- if ne site.Params.comments.utterances.repo "" -}}
- {{- if or (eq .Params.comments true) (and (ne .Params.comments false) (eq site.Params.comments.enable true)) -}}
+{{- if or (eq .Params.comments true) (and (ne .Params.comments false) (eq site.Params.comments.enable true)) -}}
+ <section class="article discussion">
+ {{- if gt (len site.DisqusShortname) 0 -}}
+ {{- template "_internal/disqus.html" . -}}
+ {{- else if ne site.Params.comments.utterances.repo "" -}}
<script
src="https://utteranc.es/client.js"
repo="{{- site.Params.comments.utterances.repo }}"
@@ -16,4 +12,5 @@
crossorigin="anonymous" async>
</script>
{{- end -}}
+ </section>
{{- end -}} \ No newline at end of file