diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 56141312..3dd11189 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -26,6 +26,7 @@ languages: title: "Hextra テーマ" zh-cn: languageName: 简体中文 + languageCode: zh-CN weight: 3 title: Hextra @@ -122,3 +123,20 @@ params: editURL: enable: true base: "https://github.com/imfing/hextra/edit/main/exampleSite/content" + + comment: + enable: false + type: giscus + + # https://giscus.app/ + giscus: + repo: "imfing/hextra" + repoId: "R_kgDOJ9fJag" + category: "General" + categoryId: "DIC_kwDOJ9fJas4CY7gW" + # mapping: "pathname" + # strict: 0 + # reactionsEnabled: 1 + # emitMetadata: 0 + # inputPosition: "top" + # lang: "en" diff --git a/layouts/partials/components/giscus.html b/layouts/partials/components/giscus.html index 1ea3dc87..a0aeb578 100644 --- a/layouts/partials/components/giscus.html +++ b/layouts/partials/components/giscus.html @@ -1,6 +1,6 @@ -{{- with site.Params.comment.giscus -}} +{{- $lang := site.Language.LanguageCode | default `en` -}} -{{- $lang = site.Language.Lang | default `en` -}} +{{- with site.Params.comment.giscus -}} +
{{- end -}}