Add commento.io support (#564)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
a1bff16050
commit
a50f947384
10 changed files with 107 additions and 94 deletions
28
layouts/partials/comments/giscus.html
Normal file
28
layouts/partials/comments/giscus.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
{{ with .giscus }}
|
||||
{{ $repo := .repo }}
|
||||
{{ $repoID := .repoID }}
|
||||
{{ $category := .category | default "General" }}
|
||||
{{ $categoryID := .categoryID }}
|
||||
{{ $theme := .theme | default "light" }}
|
||||
{{ $map := .map | default "url" }}
|
||||
{{ $reaction := .reaction | default "1" }}
|
||||
{{ $metadata := .metadata | default "0" }}
|
||||
{{ $inputPosition := .inputPosition | default "bottom" }}
|
||||
{{ $crossOrigin := .crossOrigin | default "anonymous" }}
|
||||
|
||||
<script src="https://giscus.app/client.js"
|
||||
data-repo="{{ $repo }}"
|
||||
data-repo-id="{{ $repoID }}"
|
||||
data-category="{{ $category }}"
|
||||
data-category-id="{{ $categoryID }}"
|
||||
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>
|
||||
{{ end }}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue