summaryrefslogtreecommitdiff
path: root/layouts/partials/comments.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/comments.html')
-rw-r--r--layouts/partials/comments.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
new file mode 100644
index 0000000..b2d78e1
--- /dev/null
+++ b/layouts/partials/comments.html
@@ -0,0 +1,25 @@
+{{ 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" }}"
+ crossorigin="anonymous"
+ async>
+ </script>
+{{ end }}
+{{ end }} \ No newline at end of file