We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1d3583 commit 0709854Copy full SHA for 0709854
_includes/comments/giscus.html
@@ -17,6 +17,12 @@
17
initTheme = darkTheme;
18
}
19
20
+ let lang = '{{ site.comments.giscus.lang | default: lang }}';
21
+ {%- comment -%} https://github.com/giscus/giscus/tree/main/locales {%- endcomment -%}
22
+ if (lang.length > 2 && !lang.startsWith('zh')) {
23
+ lang = lang.slice(0, 2);
24
+ }
25
+
26
let giscusAttributes = {
27
src: 'https://giscus.app/client.js',
28
'data-repo': '{{ site.comments.giscus.repo}}',
@@ -29,7 +35,7 @@
29
35
'data-emit-metadata': '0',
30
36
'data-theme': initTheme,
31
37
'data-input-position': '{{ site.comments.giscus.input_position | default: 'bottom' }}',
32
- 'data-lang': '{{ site.comments.giscus.lang | default: lang }}',
38
+ 'data-lang': lang,
33
39
'data-loading': 'lazy',
34
40
crossorigin: 'anonymous',
41
async: ''
0 commit comments