Skip to content

Commit 74a5f85

Browse files
committed
fix(giscuss): language
1 parent e4ddf5e commit 74a5f85

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

layouts/_partials/components/giscus.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
{{- $lang := site.Language.LanguageCode | default `en` -}}
1+
{{- $lang := site.Language.Lang | default `en` -}}
2+
{{- if hasPrefix $lang "zh" -}}
3+
{{- /* See: https://github.com/giscus/giscus/tree/main/locales */}}
4+
{{- $lang = site.Language.LanguageCode | default `zh-CN`-}}
5+
{{- end -}}
26

37
{{- with site.Params.comments.giscus -}}
48
<script>

0 commit comments

Comments
 (0)