diff --git a/layouts/_partials/components/giscus.html b/layouts/_partials/components/giscus.html index 84148c2..fd0cc9d 100644 --- a/layouts/_partials/components/giscus.html +++ b/layouts/_partials/components/giscus.html @@ -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() {