🇬🇧 English | 🇨🇳 简体中文
This is a plugin that automatically generates a sidebar for vuepress.
npm i vuepress-plugin-auto-sidebar -D
# v2 alpha(测试版, for vuepress v2)
npm i vuepress-plugin-auto-sidebar@alpha -D
// edit .vuepress/config.js file
module.exports = {
plugins: [
["vuepress-plugin-auto-sidebar", {}]
]
}
📖 For more detailed documentation, you can visit vuepress-plugin-auto-sidebar。
令人遗憾的事。
In VuePress v1 the above can quickly help you enable the plugin, but since VuePress v2 does not yet provide the corresponding capabilities, you need to introduce the generated sidebar.js
file yourself.
const sidebarConf = require('./sidebar')
module.exports = {
plugins: [
["vuepress-plugin-auto-sidebar", {}]
],
themeConfig: {
sidebar: sidebarConf
}
}
We have extended vuepress cli
to help you quickly generate a simple navigation bar, how to use it:
# v2 not support
vuepress nav docs