File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1717 initTheme = darkTheme ;
1818 }
1919
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+
2026 let giscusAttributes = {
2127 src : 'https://giscus.app/client.js' ,
2228 'data-repo' : '{{ site.comments.giscus.repo}}' ,
2935 'data-emit-metadata' : '0' ,
3036 'data-theme' : initTheme ,
3137 'data-input-position' : '{{ site.comments.giscus.input_position | default: ' bottom ' }}' ,
32- 'data-lang' : '{{ site.comments.giscus. lang | default: lang }}' ,
38+ 'data-lang' : lang ,
3339 'data-loading' : 'lazy' ,
3440 crossorigin : 'anonymous' ,
3541 async : ''
You can’t perform that action at this time.
0 commit comments