diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js
index d9852bf..9163315 100644
--- a/docs/.vitepress/config.js
+++ b/docs/.vitepress/config.js
@@ -26,7 +26,7 @@ export default defineConfig({
{ text: 'Open Source', link: '/opensource' },
{ text: 'Links', link: '/links' },
{ text: 'Interviews', link: '/interviews/' },
- { text: 'Wiki', link: 'https://mume.org/wiki/' }
+ { text: 'Wiki', link: 'https://docs.mume.org/wiki/' }
]
}
]
diff --git a/docs/.vitepress/theme/Layout.vue b/docs/.vitepress/theme/Layout.vue
index 3fea18b..fab5928 100644
--- a/docs/.vitepress/theme/Layout.vue
+++ b/docs/.vitepress/theme/Layout.vue
@@ -10,6 +10,22 @@ import './mume.css'
const { site, page, frontmatter } = useData()
const vpRoute = useRoute()
+const isActive = (path, exact = false) => {
+ const target = withBase(path)
+ const current = vpRoute.path
+
+ if (exact) {
+ return current === target || (target === '/' && (current === '/' || current === '/index.html'))
+ }
+
+ if (target === '/') return current === '/' || current === '/index.html'
+
+ const normalizedTarget = target.endsWith('/') ? target : target + '/'
+ const normalizedCurrent = current.endsWith('/') ? current : current + '/'
+
+ return normalizedCurrent.startsWith(normalizedTarget)
+}
+
const isMenuOpen = ref(false)
const navbarRef = ref(null)
const gandalfRef = ref(null)
@@ -70,14 +86,14 @@ onUnmounted(() => {
Play
The official Wiki contains tips, hints, and all sorts of useful information for newcomers and veterans alike.
-Visit the Wiki +Visit the Wiki