diff --git a/docs/config/app-configs.md b/docs/config/app-configs.md index a7a1660d..0a9a5de3 100644 --- a/docs/config/app-configs.md +++ b/docs/config/app-configs.md @@ -14,10 +14,14 @@ export default { ## appearance -- Type: `boolean` +- Type: `boolean | 'dark'` - Default: `true` -Whether to enable "Dark Mode" or not. If the option is set to `true`, it adds `.dark` class to the `` tag depending on the users preference. +Whether to enable dark mode or not. + +- If the option is set to `true`, the default theme will be determined by the user's preferred color scheme. +- If the option is set to `dark`, the theme will be dark by default, unless the user manually toggles it. +- If the option is set to `false`, users will not be able to toggle the theme. It also injects inline script that tries to read users settings from local storage by `vitepress-theme-appearance` key and restores users preferred color mode. @@ -199,7 +203,7 @@ export default { - Type: `string` - Default: `.` -The directory where your markdown pages are stored, relative to project root. +The directory where your markdown pages are stored, relative to project root. ```ts export default { diff --git a/src/client/theme-default/components/VPSwitchAppearance.vue b/src/client/theme-default/components/VPSwitchAppearance.vue index 46a7b0d6..2c51dadc 100644 --- a/src/client/theme-default/components/VPSwitchAppearance.vue +++ b/src/client/theme-default/components/VPSwitchAppearance.vue @@ -1,10 +1,12 @@