Casual_blog/themes/anubis2/layouts/partials/giscus.html

24 lines
992 B
HTML
Raw Normal View History

2024-03-07 06:27:02 +00:00
{{ $theme := .Site.Params.GiscusTheme | default "preferred_color_scheme" }}
{{ $mapping := .Site.Params.GiscusDataMapping | default "og:title" }}
{{ $language := .Site.Params.GiscusLang | default "en" }}
{{ $category := .Site.Params.GiscusDiscussionCategory | default "Announcements" }}
{{ $lazyload := .Site.Params.GiscusLazyLoad | default false }}
<script src="https://giscus.app/client.js"
data-repo="{{- .Site.Params.GiscusRepo -}}"
data-repo-id="{{- .Site.Params.GiscusRepoId -}}"
data-category="{{- .Site.Params.GiscusCategory -}}"
data-category-id="{{- .Site.Params.GiscusCategoryId -}}"
data-mapping="{{ $mapping }}"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="bottom"
data-theme="{{ $theme }}"
data-lang="{{ $language }}"
crossorigin="anonymous"
{{ if $lazyload }}
data-loading="lazy"
{{ end }}
async>
</script>