Skip to content

Commit

Permalink
feat: nprogress
Browse files Browse the repository at this point in the history
  • Loading branch information
camera-2018 committed Nov 11, 2024
1 parent 0cd6c05 commit da2d22d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default withMermaid({
]
},
ssr: {
noExternal: ["medium-zoom"]
noExternal: ["medium-zoom",'vitepress-plugin-nprogress']
}
}
})
Expand Down
3 changes: 3 additions & 0 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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(
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}

0 comments on commit da2d22d

Please sign in to comment.