// .vuepress/config.js
module.exports = {
themeConfig: {
sidebar: [
'/',
'/page-a',
['/page-b', 'Explicit link text']
]
}
}
沒啥好說的
需要注意的是
1 寫完文章後需要更新一遍 左側欄才生效
2 自動檢測標題層級數並顯示出來 默認爲1
如:
# 命令行接口
## 基本用法
### aaa
位置測試001
#### bbb
位置測試002
##### ccc
位置測試003
## ee
位置測試004
顯示爲
如果在md中上面添加
---
sidebarDepth: 2
---
重新編譯 效果爲:
最大的深度爲 2
https://billyyyyy3320.com/zh/2019/09/08/dive-into-vuepress-with-plugin-apis/
這篇文章寫的不錯 有機會細看