Comments (4)
在使用 v2 的过程中,由于 sidebar 需要手动配置,所以在写文档时会带来一个问题:
有些内容还是草稿,不添加到 sidebar 中就无法看到,而提交后 sidebar 又会导致不该显示的目录,手动修改虽行,但过于繁琐,后续看看能不能提个 PR 解决吧。
from vuepress-plugin-auto-sidebar.
在使用 v2 的过程中,由于 sidebar 需要手动配置,所以在写文档时会带来一个问题: 有些内容还是草稿,不添加到 sidebar 中就无法看到,而提交后 sidebar 又会导致不该显示的目录,手动修改虽行,但过于繁琐,后续看看能不能提个 PR 解决吧。
针对这种情况作了另辟蹊径的处理,在 config 中配置:
const sidebarConf = require('./sidebar')
module.exports = {
plugins: [
["vuepress-plugin-auto-sidebar", {
git: {
// `add` 表示跟踪执行了 `git add` 的文件,`commit` 表示跟踪执行了 `git commit` 的文件
// 不填写则跟踪所有状态
trackStatus: 'add'
}
}]
],
themeConfig: {
sidebar: sidebarConf
}
}
忽略未跟踪的文件,这样就不会在 sidebar 中产生它了。
from vuepress-plugin-auto-sidebar.
在使用过程中,可以设置侧边栏最大深度为2:
"vuepress-plugin-auto-sidebar" : { // 侧边栏深度 // the max value is 2 which extracts both h2 and h3 headers sidebarDepth: 2 }
由于写文章中,有非常多的h4标题,如: 1.1.1.1, 1.1.1.2 等,如果想在侧边栏显示h4级标题,该如何设置呢?
from vuepress-plugin-auto-sidebar.
在使用过程中,可以设置侧边栏最大深度为2:
"vuepress-plugin-auto-sidebar" : { // 侧边栏深度 // the max value is 2 which extracts both h2 and h3 headers sidebarDepth: 2 }
由于写文章中,有非常多的h4标题,如: 1.1.1.1, 1.1.1.2 等,如果想在侧边栏显示h4级标题,该如何设置呢?
这个控制不了,因为 vuepress1.x 及 vuepress2.x 的默认主题都不支持更多的层级。
from vuepress-plugin-auto-sidebar.
Related Issues (20)
- title->map配置未生效 HOT 3
- 关于侧边栏及自动侧边栏问题? HOT 2
- 无法生成nav.js文件
- build error: No matching page found for sidebar item "/implementation/Theme.TheAdmin/index" HOT 2
- 自行引入生成的 sidebar.js 文件,这个文件需要先运行命令生成 HOT 2
- 如何把当前目录的文件,以及子目录都显示在sidebar呢? HOT 4
- 建议:自动合并现有的sidebar配置 HOT 2
- 默认分组 HOT 2
- 打包后部署到nginx,侧边栏就没了,开发环境正常 HOT 5
- 如何隐藏文件夹的名字 HOT 1
- 请问可以支持嵌套分组吗 HOT 1
- Sidebar not being generated HOT 2
- 请问该插件在Vuepress 2.x版本中该如何使用呢?文档上迁移那里还是空白,是还没有支持嘛? HOT 6
- "docs:nav": "vuepress nav docs" 命令执行失败 HOT 1
- 侧边栏
- 侧边栏autoGroup 无法设置展示顺序或者优先级么? HOT 1
- 侧面栏空分组隐藏
- collapse不会折叠三级标题
- 如何支持二级目录
- vuepress2.0版本设置了没有生效
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuepress-plugin-auto-sidebar.