-
The configuration item sidebar referenced by vuepress(v2.0.0-beta.49) is wrong(https://v2.vuepress.vuejs.org/zh/reference/default-theme/config.html#sidebar). The correct writing method should be: module.exports = {
theme: defaultTheme({
// 侧边栏对象
// 不同子路径下的页面会使用不同的侧边栏
sidebar: {
'/guide/': [
{
text: 'Guide',
children: ['README', 'getting-started'],
},
],
'/reference/': [
{
text: 'Reference',
children: ['cli', 'config'],
},
],
},
}),
} The official usage is that sidebar will not be displayed. In fact, it can be displayed as long as the file name string. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Why don't you try to figure out why these work????????????????????????????????????????? https://github.com/vuepress/vuepress-next/blob/main/docs/.vuepress/configs/sidebar/en.ts |
Beta Was this translation helpful? Give feedback.
-
Also, it should be noted that the folder name is in Chinese, and the sidebar cannot be rendered. The English name is OK |
Beta Was this translation helpful? Give feedback.
Also, it should be noted that the folder name is in Chinese, and the sidebar cannot be rendered. The English name is OK