mirror of
https://github.com/imfing/hextra.git
synced 2025-08-23 14:26:38 -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() {
|
function getGiscusTheme() {
|
||||||
let giscusTheme = "{{ (string .theme) | default `light` }}";
|
let giscusTheme = "{{ (string .theme) | default `light` }}";
|
||||||
if(getHugoTheme() == 'light') {
|
let hugoTheme = getHugoTheme();
|
||||||
|
if(hugoTheme == 'light') {
|
||||||
return giscusTheme.replace('dark', 'light');
|
return giscusTheme.replace('dark', 'light');
|
||||||
} else {
|
}
|
||||||
|
if(hugoTheme == 'dark') {
|
||||||
return giscusTheme.replace('light', 'dark');
|
return giscusTheme.replace('light', 'dark');
|
||||||
}
|
}
|
||||||
|
return giscusTheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setGiscusTheme() {
|
function setGiscusTheme() {
|
||||||
|
Reference in New Issue
Block a user