Add max level option

This commit is contained in:
qingwei.li 2016-11-27 13:09:18 +08:00
commit eba21726d7
11 changed files with 201 additions and 17 deletions

View file

@ -14,5 +14,5 @@
</nav>
<div id="app"></div>
</body>
<script src="//unpkg.com/docsify" data-repo="qingwei-li/docsify"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js" data-repo="qingwei-li/docsify" data-max-level="3"></script>
</html>

View file

@ -91,8 +91,26 @@ Code in `404.html`
</nav>
```
### GitHub Corner
Modify your `404.html`
### Options
#### repo
Display the [GitHub Corner](http://tholman.com/github-corners/) widget.
```html
<script src="//unpkg.com/docsify" data-repo="your/repo"></script>
```
#### max-level
Toc level.
```html
<script src="//unpkg.com/docsify" data-max-level="6"></script>
```
#### el
Root element.
```html
<script src="//unpkg.com/docsify" data-el="#app"></script>
```

View file

@ -90,11 +90,26 @@ docsify serve docs
</nav>
```
### GitHub Corner
### 配置参数
#### repo
参考本文档的右上角的 GitHub 图标,如果要开启的话,将 `404.html` 里的 script 改成
```html
<script src="//unpkg.com/docsify" data-repo="your/repo"></script>
```
#### max-level
目录最大展开层级,默认值为 6
```html
<script src="//unpkg.com/docsify" data-max-level="6"></script>
```
#### el
替换节点元素,默认为 `#app`
```html
<script src="//unpkg.com/docsify" data-el="#app"></script>
```