I would like to have custom links and different sidebar for every single page I don't want my headings render as table of contents in sidebar I would like to have custom content like this.
Node JS
-Lecture 1 Introduction
--Sub Lecture
-Lecture 2 Basics
--Sub Lecture
---Nested Lecture
Where all the lectures are custom links. So how can I do that.
Type: false | 'auto' | SidebarConfigArray | SidebarConfigObject
Default: 'auto'
Details:
Configuration of sidebar.
You can override this global option via sidebar frontmatter in your pages.
Set to false
to disable sidebar.
If you set it to 'auto'
, the sidebar will be automatically generated from the page headers.
To configure the sidebar items manually, you can set this option to a sidebar array, each item of which could be a SidebarItem
object or a string:
SidebarItem
object should have a text
field, could have an optional link
field and an optional children
field. The children
field should be a sidebar array.SidebarItem
object, whose text
is the page title, link
is the page route path, and children
is automatically generated from the page headers.If you want to set different sidebar for different sub paths, you can set this option to a sidebar object:
In order to add custom links external as well as internal see this:
module.exports = {
themeConfig: {
// sidebar object
// pages under different sub paths will use different sidebar
sidebar: {
'/guide/': [
{
text: 'Guide',
children: ['/guide/README.md', '/guide/getting-started.md'],
},
],
'/reference/': [
{
text: 'Reference',
children: ['/reference/cli.md', '/reference/config.md'],
},
],
},
},
}
For more info see Sidebar Config