为VuePress自动生成侧边栏分组的插件

Github:https://github.com/shanyuhai123/vuepress-plugin-auto-sidebar
文档:https://shanyuhai123.github.io/vuepress-plugin-auto-sidebar/

插件的可选项:https://shanyuhai123.github.io/vuepress-plugin-auto-sidebar/features/plugin-options.html
精准排序:https://shanyuhai123.github.io/vuepress-plugin-auto-sidebar/features/markdown-file-config.html#精准排序
多个分组:https://shanyuhai123.github.io/vuepress-plugin-auto-sidebar/features/markdown-file-config.html#多个分组

module.exports = {
  plugins: {
    "vuepress-plugin-auto-sidebar": {
      collapsable: true,
      sidebarDepth: 2,
    }
  }
}

常见问题:侧边栏显示的是文件路径,而非文件名

这是由于 md 文件中缺乏标题导致的,标题的产生有两种方式:

(1)添加 Front Matter 的 title 属性(推荐)

---
title: 标题
---

(2)markdown 语法中的标题

# 一级标题
## 二级标题

文件名如何嵌套多级标题

注:title 属性相当于一级标题,如果设置 title 属性,正文应以二级标题为最顶级标题

配置全局的 depth,如果你希望配置某个文件的 depth 修改文件内的 sidebarDepth

上一篇 VuePress技术笔记站点部署
下一篇 VuePress图片资源中文路径问题
目录
文章列表
1 解决Android跑马灯不动问题
解决Android跑马灯不动问题
2
Shadowsocks + Privoxy 搭建 http 代理服务
Shadowsocks + Privoxy 搭建 http 代理服务
3
Flutter Widget之Row
Flutter Widget之Row
4
CentOS下部署ZooKeeper
CentOS下部署ZooKeeper
5
Android集成Bugly热更新
Android集成Bugly热更新
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。