1、在 md 文件头部使用 YAML front matter 语法,用于自动生成侧边栏
YAML front matter
--- sidebarDepth: 2 sidebar: auto ---
2、根据上一步配置,组织文章标题时需要遵守的规则为:文章标题使用一级标题;章节标题使用二级标题。示例:
# title ## chapter 1 this is chapter 1 ## chapter 2 this is chapter 2
3、修改 config.js,指定文章所在的分类