We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c87a42 commit 0ac6f48Copy full SHA for 0ac6f48
.gitignore
@@ -12,5 +12,4 @@ node_modules/
12
package-lock.json
13
pnpm-lock.yaml
14
bun.lockb
15
-
16
-tags
+bun.lock
.vitepress/theme/index.ts
@@ -13,7 +13,13 @@ export default {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
});
},
- enhanceApp({ app, router, siteData }) {
17
- // ...
+ enhanceApp({ router }) {
+ router.onAfterRouteChange = (to) => {
18
+ const hashPath = to.match(/^\/#\/(.+)\/?$/);
19
+ if (hashPath) {
20
+ console.warn("Hash path is deprecated, redirecting...");
21
+ router.go(hashPath[1]);
22
+ }
23
+ };
24
25
} satisfies Theme;
0 commit comments