diff options
author | James Ray <rihoj1@gmail.com> | 2022-02-28 20:45:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 20:45:03 +0300 |
commit | 711d4c774923a3134e3f3164d45c994e07c8afc3 (patch) | |
tree | bd43bd3c157f898f3337bcde9657a1432aee50db /layouts/partials | |
parent | 56e1bc5a69e855bfd2a842ca63e1368e2989c1f6 (diff) |
Support commenting using `giscus` (#543)
* add giscus
* update theme default to light
update category default to General
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/giscus.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/layouts/partials/giscus.html b/layouts/partials/giscus.html new file mode 100644 index 0000000..90e11b5 --- /dev/null +++ b/layouts/partials/giscus.html @@ -0,0 +1,21 @@ +{{ $repo := site.Params.features.comment.giscus.repo }} +{{ $category := site.Params.features.comment.giscus.category | default "General" }} +{{ $theme := site.Params.features.comment.giscus.theme | default "light" }} +{{ $map := site.Params.features.comment.giscus.map | default "url" }} +{{ $reaction := site.Params.features.comment.giscus.reaction | default "1" }} +{{ $metadata := site.Params.features.comment.giscus.metadata | default "0" }} +{{ $inputPosition := site.Params.features.comment.giscus.inputPosition | default "bottom" }} +{{ $crossOrigin := site.Params.features.comment.giscus.crossOrigin | default "anonymous" }} + +<script src="https://giscus.app/client.js" + data-repo="{{ $repo }}" + data-category="{{ $category }}" + data-mapping="{{ $map }}" + data-reactions-enabled="{{ $reaction }}" + data-emit-metadata="{{ $metadata }}" + data-input-position="{{ $inputPosition }}" + data-theme="{{ $theme }}" + data-lang="{{ .Site.Language.Lang }}" + crossorigin="{{ $crossOrigin }}" + async> +</script> |