Ideas about sidebar #147
-
I want to share some ideas here, and if you like it I can build PRs for it. Remain or at least support the old V1 logic on SidebarObjectsHere is the V1 logic: So I think it's better for the official theme to both support: module.exports = {
themeConfig: {
// 侧边栏对象
// 不同子路径下的页面会使用不同的侧边栏
sidebar: {
'/guide/': [
{
isGroup: true,
text: 'Guide',
children: ['/guide/README.md', '/guide/getting-started.md'],
},
],
'/reference/': [
{
isGroup: true,
text: 'Reference',
children: ['/reference/cli.md', '/reference/config.md'],
},
],
},
},
} And module.exports = {
themeConfig: {
// 侧边栏对象
// 不同子路径下的页面会使用不同的侧边栏
sidebar: {
'/guide/': [
{
isGroup: true,
text: 'Guide',
children: ['README.md', 'getting-started.md'],
},
],
'/reference/': [
{
isGroup: true,
text: 'Reference',
children: ['cli.md', 'config.md'],
},
],
},
},
} Make the md suffix optionalPeople should be warned that Remove
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Most of those you mentioned are the legacy when migrating the sidebar of default theme. We can optimize them for sure.
--- update
--- update Now Then a special "sidebar sub group" is no longer supported (which should be rarely used). |
Beta Was this translation helpful? Give feedback.
-
Already supported |
Beta Was this translation helpful? Give feedback.
Already supported