diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index a8e35ab6..3c6b21d7 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -20,6 +20,16 @@ export default withMermaid(defineConfig({ ignoreDeadLinks: true, head: [ ['link', { rel: 'icon', href: `${base}favicon.svg`, type: 'image/svg+xml' }], + [ + 'script', + {}, + `(function() { + try { + var theme = localStorage.getItem('ccw-theme') || 'blue'; + document.documentElement.setAttribute('data-theme', theme); + } catch (e) {} +})()` + ], ['meta', { name: 'theme-color', content: '#3b82f6' }], ['meta', { name: 'og:type', content: 'website' }], ['meta', { name: 'og:locale', content: 'en_US' }],