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

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAthanasia Monika Mowinckel <Athanasiamo@users.noreply.github.com>2021-12-19 04:43:37 +0300
committerGitHub <noreply@github.com>2021-12-19 04:43:37 +0300
commit8c3c9cedd0724cc5909260a8914d19ec2cc65b0e (patch)
tree43761ecce20098811c5d0151c61ed15e4951202e /layouts
parent067768c63d3663ec752ab5185dc35a3f01b308cb (diff)
Add option for giscus comment section (#309)
* add giscus option * add giscus options to config.toml * rm quotes around hugo code
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/comments.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index 26cb4b6..c5e2a50 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -3,3 +3,21 @@
{{ template "_internal/disqus.html" . }}
</div>
{{- end }}
+
+{{- if .Site.Params.giscus.repo }}
+<div class="container giscus my-4">
+ <script src="https://giscus.app/client.js"
+ data-repo={{ .Site.Params.giscus.repo }}
+ data-repo-id={{ .Site.Params.giscus.repo_id }}
+ data-category={{ .Site.Params.giscus.category }}
+ data-category-id={{ .Site.Params.giscus.category_id }}
+ data-mapping={{ .Site.Params.giscus.mapping }}
+ data-reactions-enabled={{ .Site.Params.giscus.reactions_enabled | default 0}}
+ data-emit-metadata={{ .Site.Params.giscus.emit_metadata | default 0 }}
+ data-theme={{ .Site.Params.giscus.theme }}
+ data-lang={{ .Site.Params.giscus.lang }}
+ crossorigin="anonymous"
+ async>
+ </script>
+</div>
+{{- end }}