docs: make sidebar config a bit more organized

pull/141/head
Kia King Ishii 4 years ago
parent 018a9b46d9
commit 08480c7fba

@ -20,19 +20,28 @@ module.exports = {
],
sidebar: {
'/guide/': [
{
text: 'Introduction',
children: [
{ text: 'What is VitePress?', link: '/' },
{ text: 'Getting Started', link: '/guide/getting-started' },
{ text: 'Configuration', link: '/guide/configuration' },
{ text: 'Customization', link: '/guide/customization' },
{ text: 'Deploying', link: '/guide/deploy' }
]
}
],
'/config/': [{ text: 'Config Reference', link: '/config/' }]
'/': getGuideSidebar(),
'/guide/': getGuideSidebar(),
'/config/': getConfigSidebar()
}
}
}
function getGuideSidebar() {
return [
{
text: 'Introduction',
children: [
{ text: 'What is VitePress?', link: '/' },
{ text: 'Getting Started', link: '/guide/getting-started' },
{ text: 'Configuration', link: '/guide/configuration' },
{ text: 'Customization', link: '/guide/customization' },
{ text: 'Deploying', link: '/guide/deploy' }
]
}
]
}
function getConfigSidebar() {
return [{ text: 'Config Reference', link: '/config/' }]
}

Loading…
Cancel
Save