Use repoID and categoryID in giscus template

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
hossainemruz 2022-03-15 23:20:07 +06:00
parent 974d4485ba
commit f44cbb876b

View file

@ -1,5 +1,7 @@
{{ $repo := site.Params.features.comment.giscus.repo }}
{{ $repoID := site.Params.features.comment.giscus.repoID }}
{{ $category := site.Params.features.comment.giscus.category | default "General" }}
{{ $categoryID := site.Params.features.comment.giscus.categoryID }}
{{ $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" }}
@ -9,7 +11,9 @@
<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 }}"