diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 46bcabf..b6b182a 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -186,7 +186,7 @@ export default withMermaid({ ] }, ssr: { - noExternal: ["medium-zoom"] + noExternal: ["medium-zoom",'vitepress-plugin-nprogress'] } } }) diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index 40e97b9..557e99e 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -14,6 +14,8 @@ import './style.css' import './rainbow.css' import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client' import '@shikijs/vitepress-twoslash/style.css' +import vitepressNprogress from 'vitepress-plugin-nprogress' +import 'vitepress-plugin-nprogress/lib/css/index.css' let homePageStyle: HTMLStyleElement | undefined = undefined @@ -30,6 +32,7 @@ export default { ctx.app.component('ShortLink', ShortLink) ctx.app.component('WikiLogo', WikiLogo) ctx.app.use(TwoslashFloatingVue) + vitepressNprogress(ctx) if (typeof window === 'undefined') return watch( diff --git a/package.json b/package.json index 7b27d6f..067e377 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,11 @@ "unplugin-vue-macros": "^2.13.3", "vite-plugin-pwa": "^0.20.5", "vitepress": "^1.5.0", - "vitepress-plugin-mermaid": "^2.0.17" + "vitepress-plugin-mermaid": "^2.0.17", + "vitepress-plugin-nprogress": "^0.0.4" }, "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "^4.24.4", "@rollup/rollup-win32-x64-msvc": "^4.24.4" } -} +} \ No newline at end of file