summaryrefslogtreecommitdiff
path: root/layouts/partials/comments.html
blob: cf4ccabcca97e52e70deae2843957d848f4e8b90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{{ if (ne .Params.comment false) -}}

{{ if .Site.DisqusShortname }}
{{ template "_internal/disqus.html" . }}
{{ end }}

{{ $giscus := .Site.Params.giscus }}
{{ if $giscus.enable }}
<div class="giscus" id="comments"></div>
<script src="https://giscus.app/client.js" 
  data-repo="{{ $giscus.repo }}" 
  data-repo-id="{{ $giscus.repo_id }}"
  data-category="{{ $giscus.category }}"
  data-category-id="{{ $giscus.category_id }}"
  data-mapping="pathname"
  data-strict="0" 
  data-reactions-enabled="1" 
  data-emit-metadata="0" 
  data-input-position="{{ $giscus.input_position | default "top" }}"
  data-theme="{{ $giscus.theme | default "light" }}"
  data-lang="{{ $giscus.lang | default "en" }}"
  crossorigin="anonymous"
  async>
  </script>
{{ end }}
{{ end }}