diff --git a/website/plugins/colorMode.ts b/website/plugins/colorMode.ts new file mode 100644 index 000000000..9f797d945 --- /dev/null +++ b/website/plugins/colorMode.ts @@ -0,0 +1,9 @@ +// Forces light color mode even if localStorage already contains saved preference. +// `colorMode.preference` setting from `nuxt.config.ts` is not enough in this case. +export default defineNuxtPlugin((nuxtApp) => { + const colorMode = useColorMode(); + nuxtApp.hook("app:mounted", () => { + colorMode.preference = "light"; + colorMode.value = "light"; + }); +});