diff --git a/_config.yml b/_config.yml index 373784e..76fa52c 100644 --- a/_config.yml +++ b/_config.yml @@ -100,6 +100,8 @@ comments: mapping: # optional, default to 'pathname' input_position: # optional, default to 'bottom' lang: # optional, default to the value of `site.lang` + light_theme: # optional, defaults to 'light' + dark_theme: # optional, defaults to 'dark_dimmed' reactions_enabled: # optional, default to the value of `1` # Self-hosted static assets, optional › https://github.com/cotes2020/chirpy-static-assets diff --git a/_includes/comments/giscus.html b/_includes/comments/giscus.html index 8f04246..ad428f4 100644 --- a/_includes/comments/giscus.html +++ b/_includes/comments/giscus.html @@ -3,8 +3,8 @@ (function () { const origin = 'https://giscus.app'; const iframe = 'iframe.giscus-frame'; - const lightTheme = 'light'; - const darkTheme = 'dark_dimmed'; + const lightTheme = '{{ site.comments.giscus.light_theme | default: 'light' }}'; + const darkTheme = '{{ site.comments.giscus.dark_theme | default: 'dark_dimmed' }}'; let initTheme = lightTheme; const html = document.documentElement;