Skip to content

Commit

Permalink
docs: update docs for 'active header links'
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed May 24, 2018
1 parent b0c9e11 commit affecd8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/default-theme-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,15 @@ By default, the nested header links and the hash in the URL are updated as the u
``` js
module.exports = {
themeConfig: {
disableActiveHash: true, // boolean
activeHeaderLinks: false, // Default: true
}
}
```

::: tip
It is worth mentioning that when you disable this option, the corresponding script of this functionality will not be loaded. This is a small point in our performance optimization.
:::

### Sidebar Groups

You can divide sidebar links into multiple groups by using objects:
Expand Down
17 changes: 17 additions & 0 deletions docs/zh/default-theme-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,23 @@ sidebarDepth: 2
---
```

### 活动的标题链接

默认情况下,当用户通过滚动查看页面的不同部分时,嵌套的标题链接和 URL 中的 Hash 值会实时更新,这个行为可以通过以下的配置来禁用:

``` js
module.exports = {
themeConfig: {
activeHeaderLinks: false, // 默认值:true
}
}
```

::: tip
值得一提的是,当您禁用此选项时,此功能的相应脚本将不会被加载,这也是我们性能优化的一个小点。
:::


### 侧边栏分组

你可以通过使用**对象**来将侧边栏划分成多个组:
Expand Down

0 comments on commit affecd8

Please sign in to comment.