1
0

Docs: fix previous/next page button (#2760)

Signed-off-by: Birkhoff Lee <git@birkhoff.me>
This commit is contained in:
Birkhoff Lee 2023-05-21 21:22:52 +08:00 committed by GitHub
parent acec0f5c89
commit e8b2d0ecc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ function generateSidebarChapter(chapterDirName: string): any {
items.push({ items.push({
sidebarOrder, sidebarOrder,
text: sidebarTitle, text: sidebarTitle,
link: doc.path.replace(/^docs/, '') link: "/" + doc.path
}) })
} }
@ -48,6 +48,7 @@ function generateSidebarChapter(chapterDirName: string): any {
return { return {
text, text,
collapsed: false,
items, items,
} }
} }
@ -87,7 +88,7 @@ export default defineConfig({
// https://vitepress.dev/reference/default-theme-config // https://vitepress.dev/reference/default-theme-config
nav: [ nav: [
{ text: 'Home', link: '/' }, { text: 'Home', link: '/' },
{ text: 'Configuration', link: '/configuration/configuration-reference.md' }, { text: 'Configuration', link: '/configuration/configuration-reference' },
{ {
text: 'Download', text: 'Download',
items: [ items: [