File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- <!-- Custom giscus embed (light theme forced) based on Chirpy default -->
1+ <!-- https:// giscus.app/ -->
22< script >
33 ( function ( ) {
4- // Force light theme for giscus regardless of site theme
5- const themeMapper = Theme . getThemeMapper ( 'light' , 'light' ) ;
4+ const themeMapper = Theme . getThemeMapper ( 'light' , 'dark_dimmed' ) ;
65 const initTheme = themeMapper [ Theme . visualState ] ;
76
87 let lang = '{{ site.comments.giscus.lang | default: lang }}' ;
8+ { % comment % } https://github.com/giscus/giscus/tree/main/locales {% endcomment %}
99 if ( lang . length > 2 && ! lang . startsWith ( 'zh' ) ) {
1010 lang = lang . slice ( 0 , 2 ) ;
1111 }
1212
13- const giscusAttributes = {
13+ let giscusAttributes = {
1414 src : 'https://giscus.app/client.js' ,
1515 'data-repo' : '{{ site.comments.giscus.repo}}' ,
1616 'data-repo-id' : '{{ site.comments.giscus.repo_id }}' ,
2828 async : ''
2929 } ;
3030
31- const giscusNode = document . createElement ( 'script' ) ;
31+ let giscusNode = document . createElement ( 'script' ) ;
3232 Object . entries ( giscusAttributes ) . forEach ( ( [ key , value ] ) =>
3333 giscusNode . setAttribute ( key , value )
3434 ) ;
You can’t perform that action at this time.
0 commit comments