diff --git a/index.html b/index.html
index 7377f4ce..c462a647 100644
--- a/index.html
+++ b/index.html
@@ -195,12 +195,6 @@
Preview Website |
-
- Awesome ChatGPT |
-  |
-  |
- Preview Website |
-
Awesome UIKit |
 |
diff --git a/js/giscus.js b/js/giscus.js
index e32865c0..36f8efd9 100644
--- a/js/giscus.js
+++ b/js/giscus.js
@@ -1,11 +1,11 @@
;(() => {
const targetElement = document.documentElement;
- const defaultTheme = targetElement.getAttribute("data-color-mode").toLocaleLowerCase();
+ const defaultTheme = targetElement.getAttribute("data-color-mode");
changeGiscusTheme(defaultTheme)
const observer = new MutationObserver((mutationsList, observer) => {
for(const mutation of mutationsList) {
if (mutation.type === 'attributes') {
- const value = targetElement.getAttribute("data-color-mode").toLocaleLowerCase();
+ const value = targetElement.getAttribute("data-color-mode");
changeGiscusTheme(value)
}
}
@@ -16,12 +16,17 @@
attributeOldValue: true
});
- function changeGiscusTheme(theme) {
+ function changeGiscusTheme(theme = "light") {
const iframe = document.querySelector('.giscus-frame');
if (iframe) {
- iframe.contentWindow.postMessage({
- giscus: { theme }
- }, 'https://giscus.app');
+ const config = {
+ giscus: {
+ setConfig: {
+ theme: theme.toLocaleLowerCase(),
+ },
+ }
+ };
+ iframe.contentWindow.postMessage(config, 'https://giscus.app');
}
}
})();
diff --git a/sitemap.txt b/sitemap.txt
index e987c269..af4dd3e9 100644
--- a/sitemap.txt
+++ b/sitemap.txt
@@ -2,20 +2,20 @@ https://wangchujiang.com/idoc/about.html
https://wangchujiang.com/idoc/awesome.html
https://wangchujiang.com/idoc/markdown.html
https://wangchujiang.com/idoc/markdown/index.html
-https://wangchujiang.com/idoc/markdown/extended-syntax.html
https://wangchujiang.com/idoc/markdown/basic-syntax.html
+https://wangchujiang.com/idoc/markdown/extended-syntax.html
https://wangchujiang.com/idoc/markdown/insert-img.html
https://wangchujiang.com/idoc/markdown/line-html.html
https://wangchujiang.com/idoc/introduce/index.html
https://wangchujiang.com/idoc/introduce/api/command.html
https://wangchujiang.com/idoc/introduce/api/config.html
+https://wangchujiang.com/idoc/introduce/theme/templates.html
+https://wangchujiang.com/idoc/introduce/theme/theme-defalut.html
+https://wangchujiang.com/idoc/introduce/theme/variables.html
https://wangchujiang.com/idoc/introduce/getting-started/home.html
https://wangchujiang.com/idoc/introduce/getting-started/installation.html
https://wangchujiang.com/idoc/introduce/getting-started/publish.html
https://wangchujiang.com/idoc/introduce/getting-started/site-add.html
https://wangchujiang.com/idoc/introduce/getting-started/site-creation.html
https://wangchujiang.com/idoc/introduce/getting-started/site-preparation.html
-https://wangchujiang.com/idoc/introduce/theme/templates.html
-https://wangchujiang.com/idoc/introduce/theme/theme-defalut.html
-https://wangchujiang.com/idoc/introduce/theme/variables.html
https://wangchujiang.com/idoc/index.html
\ No newline at end of file