docs: begin requirements for multi-lang support

This commit is contained in:
ZanzyTHEbar 2023-01-20 15:23:02 +00:00
parent da86366757
commit 22b922c6eb

View File

@ -1,10 +1,20 @@
//https://vitepress.vuejs.org/guide/theme-introduction#customizing-css
import { ThemeSettings } from '../../src/custom/theme'
import { inBrowser, useData } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import '../../src/styles/imports.css'
import { watchEffect } from 'vue'
const CustomTheme = {
...DefaultTheme,
setup() {
const { lang } = useData()
watchEffect(() => {
if (inBrowser) {
document.cookie = `nf_lang=${lang.value}; expires=Mon, 1 Jan 2024 00:00:00 UTC; path=/`
}
})
},
...ThemeSettings
}