From e8b2d0ecc8ad8856345524ae3cec338caaece7ae Mon Sep 17 00:00:00 2001 From: Birkhoff Lee Date: Sun, 21 May 2023 21:22:52 +0800 Subject: [PATCH] Docs: fix previous/next page button (#2760) Signed-off-by: Birkhoff Lee --- docs/.vitepress/config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index b90bd0b..169eb28 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -37,7 +37,7 @@ function generateSidebarChapter(chapterDirName: string): any { items.push({ sidebarOrder, text: sidebarTitle, - link: doc.path.replace(/^docs/, '') + link: "/" + doc.path }) } @@ -48,6 +48,7 @@ function generateSidebarChapter(chapterDirName: string): any { return { text, + collapsed: false, items, } } @@ -87,7 +88,7 @@ export default defineConfig({ // https://vitepress.dev/reference/default-theme-config nav: [ { text: 'Home', link: '/' }, - { text: 'Configuration', link: '/configuration/configuration-reference.md' }, + { text: 'Configuration', link: '/configuration/configuration-reference' }, { text: 'Download', items: [