elli-website/themes/elli/layouts/partials/comments.html

31 lines
1.4 KiB
HTML
Raw Permalink Normal View History

2023-08-16 13:32:12 +02:00
{{ if .Site.Params.comments.system }}
<div class="px-2 mb-2">
{{ if eq .Site.Params.comments.system "disqus" }}
{{ template "_internal/disqus.html" . }}
{{ else if eq .Site.Params.comments.system "giscus" }}
<script src="https://giscus.app/client.js"
data-repo="{{ .Site.Params.comments.repo }}"
data-repo-id="{{ .Site.Params.comments.repoid }}"
data-category="{{ .Site.Params.comments.category }}"
data-category-id="{{ .Site.Params.comments.categoryid }}"
data-mapping="{{ default "pathname" .Site.Params.comments.mapping }}"
data-strict="{{ default "0" .Site.Params.comments.strict }}"
data-reactions-enabled="{{ default "1" .Site.Params.comments.reactionsenabled }}"
data-emit-metadata="{{ default "0" .Site.Params.comments.emitmetadata }}"
data-input-position="{{ default "bottom" .Site.Params.comments.inputposition }}"
data-theme="{{ default "preferred_color_scheme" .Site.Params.comments.theme }}"
data-lang="{{ default "en" $.Site.Language.Lang }}"
crossorigin="anonymous"
async>
</script>
{{ else if eq .Site.Params.comments.system "utterances" }}
<script src="https://utteranc.es/client.js"
repo="{{ .Site.Params.comments.repo }}"
issue-term="{{ default "pathname" .Site.Params.comments.issueterm }}"
theme="{{ default "preferred_color_scheme" .Site.Params.comments.theme }}"
crossorigin="anonymous"
async>
</script>
{{ end }}
</div>
{{ end }}