diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 6b8c13eef..2de27c70d 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -638,6 +638,14 @@ export default defineConfigWithTheme({ 'utf-8' ) ], + [ + 'script', + {}, + fs.readFileSync( + path.resolve(__dirname, './inlined-scripts/uwu.js'), + 'utf-8' + ) + ], [ 'script', { diff --git a/.vitepress/inlined-scripts/uwu.js b/.vitepress/inlined-scripts/uwu.js new file mode 100644 index 000000000..5b25107e4 --- /dev/null +++ b/.vitepress/inlined-scripts/uwu.js @@ -0,0 +1,3 @@ +if (location.search.includes('?uwu')) { + document.documentElement.classList.add('uwu') +} diff --git a/.vitepress/theme/components/Home.vue b/.vitepress/theme/components/Home.vue index 618d8dd36..a101772a3 100644 --- a/.vitepress/theme/components/Home.vue +++ b/.vitepress/theme/components/Home.vue @@ -11,6 +11,7 @@ onMounted(load)