Fix paths
This commit is contained in:
@@ -11,6 +11,7 @@ import { fileURLToPath, URL } from 'node:url'
|
||||
import { telegram } from '../../website/icons'
|
||||
import { normalize } from 'vitepress/dist/client/shared'
|
||||
import { tabsMarkdownPlugin } from "vitepress-plugin-tabs"
|
||||
import pluginRewriteAll from 'vite-plugin-rewrite-all';
|
||||
|
||||
import shortcode_plugin from "markdown-it-shortcode-tag"
|
||||
import shortcodes from "./shortcodes"
|
||||
@@ -51,6 +52,7 @@ export default defineConfigWithTheme<Theme.Config>({
|
||||
config (md) {
|
||||
addPlugins(md)
|
||||
md.use(tabsMarkdownPlugin)
|
||||
md.use(pluginRewriteAll)
|
||||
md.use(shortcode_plugin, shortcodes)
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type Router, inBrowser } from 'vitepress'
|
||||
import { type App, watch, defineComponent } from 'vue'
|
||||
import { type Router, inBrowser, useData } from 'vitepress'
|
||||
import { type App, watch, defineComponent, watchEffect } from 'vue'
|
||||
import { createZoom } from './composables/zoom'
|
||||
import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client"
|
||||
import analytics from "./plugins/analytics"
|
||||
@@ -12,6 +12,15 @@ export default {
|
||||
extends: DefaultTheme,
|
||||
Layout: Layout,
|
||||
|
||||
setup() {
|
||||
const { lang } = useData()
|
||||
watchEffect(() => {
|
||||
if (inBrowser) {
|
||||
document.cookie = `nf_lang=${lang.value}; expires=Mon, 1 Jan 2024 00:00:00 UTC; path=/`
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
enhanceApp({ app, router }: { app: App, router: Router }) {
|
||||
enhanceAppWithTabs(app)
|
||||
createZoom(app, router)
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"stylus": "0.60.0",
|
||||
"transliteration": "^2.3.5",
|
||||
"vue3-carousel": "0.3.1",
|
||||
"vite-plugin-rewrite-all": "1.0.1",
|
||||
"vitepress": "^1.0.0-rc.20",
|
||||
"vitepress-plugin-tabs": "0.4.1",
|
||||
"vue": "^3.3.4",
|
||||
|
||||
Reference in New Issue
Block a user