~ruther/qmk_firmware

ref: 119e54e9e3db66355a07be5f8db9fcc81b65f1ff qmk_firmware/builddefs/docsgen/.vitepress/theme/QMKLayout.vue -rw-r--r-- 483 bytes
119e54e9 — Joel Challis Docs theme updates (#23832) 1 year, 18 days ago
                                                                                
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>
Do not follow this link