blob: 30d0780d7c31259927f3aad75a961920be6459df (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<script setup>
import DefaultTheme from 'vitepress/theme'
import { useRouter } from 'vitepress'
import { onBeforeMount } from 'vue';
const router = useRouter()
onBeforeMount(async () => {
if (window.location.href.includes('/#/')) {
const newUrl = window.location.href.replace(/\/#\//, '/').replace(/\?id=/, '#');
window.history.replaceState({}, '', newUrl);
await router.go(newUrl);
}
});
</script>
<template>
<DefaultTheme.Layout/>
</template>
|