Vitepress conversion of docs. (#23795)
This commit is contained in:
parent
395766657f
commit
6ef9717288
357 changed files with 3611 additions and 24208 deletions
18
builddefs/docsgen/.vitepress/theme/QMKLayout.vue
Normal file
18
builddefs/docsgen/.vitepress/theme/QMKLayout.vue
Normal file
|
@ -0,0 +1,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>
|
Loading…
Add table
Add a link
Reference in a new issue