Sidebar
Introduction
Pass sidebar
option to theme default to configure sidebar
Example
const sidebar = {
'/foo/': [
{
title: 'Bar',
to: '/foo/bar/',
},
{
title: 'Zoo',
collapsible: true,
items: [
{
title: 'Sub item',
to: '/sub/item/link'
}
]
},
{
title: 'External github page',
to: 'https://github.com'
}
]
}
const sidebar = {
'/foo/': [
{
title: 'Bar',
to: '/foo/bar/',
},
{
title: 'Zoo',
collapsible: true,
items: [
{
title: 'Sub item',
to: '/sub/item/link'
}
]
},
{
title: 'External github page',
to: 'https://github.com'
}
]
}
js
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
On this page