Sidebar
Introduction
Pass sidebar
option to theme default to configure sidebar
Example
import { } from 'vite'
import { } from '@sveltepress/vite'
import { } from '@sveltepress/theme-default'
export default ({
: [
({
: ({
: {
'/foo/': [
{
: 'Bar',
: '/foo/bar/',
},
{
: 'Zoo',
: true,
: [
{
: 'Sub item',
: '/sub/item/link'
}
]
},
{
: 'External github page',
: 'https://github.com'
}
]
}
})
})
]
})
ts
title
The sidebar item title
to
The link address
Auto external
Unlike the navbar item, sidebar item use the Link
component.
Which means link starts with http(s)
would be auto recognized as external links.
collapsible
Determine wether the sidebar group is collapsible or not. Default is false
items
Sub items
Nested items
Nested items is supported
On this page