mirror of
https://github.com/imfing/hextra.git
synced 2025-08-23 16:26:34 -04:00
fix: giscus theme will be switched to dark when no 'color-theme' field (#723)
This commit is contained in:
@@ -14,11 +14,14 @@
|
||||
|
||||
function getGiscusTheme() {
|
||||
let giscusTheme = "{{ (string .theme) | default `light` }}";
|
||||
if(getHugoTheme() == 'light') {
|
||||
let hugoTheme = getHugoTheme();
|
||||
if(hugoTheme == 'light') {
|
||||
return giscusTheme.replace('dark', 'light');
|
||||
} else {
|
||||
}
|
||||
if(hugoTheme == 'dark') {
|
||||
return giscusTheme.replace('light', 'dark');
|
||||
}
|
||||
return giscusTheme;
|
||||
}
|
||||
|
||||
function setGiscusTheme() {
|
||||
|
Reference in New Issue
Block a user