reliable985 / vuepress-plugin-auto-sidebar

vuepress 自动生成侧边栏的插件。

Home Page:https://shanyuhai123.github.io/vuepress-plugin-auto-sidebar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vuepress Plugin Auto Sidebar

Vuepress Plugin Auto Sidebar npm npm

🇬🇧 English | 🇨🇳 简体中文

介绍(Introduction)

This is a plugin that automatically generates a sidebar for vuepress.

安装(Install)

npm i vuepress-plugin-auto-sidebar -D

# v2 alpha(测试版, for vuepress v2)
npm i vuepress-plugin-auto-sidebar@alpha -D

使用(Usage)

// edit .vuepress/config.js file
module.exports = {
  plugins: [
    ["vuepress-plugin-auto-sidebar", {}]
  ]
}

📖 For more detailed documentation, you can visit vuepress-plugin-auto-sidebar

1. Require

令人遗憾的事。

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
  }
}

2. Simple Navbar

We have extended vuepress cli to help you quickly generate a simple navigation bar, how to use it:

# v2 not support
vuepress nav docs

About

vuepress 自动生成侧边栏的插件。

https://shanyuhai123.github.io/vuepress-plugin-auto-sidebar/

License:MIT License


Languages

Language:TypeScript 72.4%Language:JavaScript 27.5%Language:Stylus 0.1%