Skip to content

Commit affecd8

Browse files
committed
docs: update docs for 'active header links'
1 parent b0c9e11 commit affecd8

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

docs/default-theme-config/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,15 @@ By default, the nested header links and the hash in the URL are updated as the u
149149
``` js
150150
module.exports = {
151151
themeConfig: {
152-
disableActiveHash: true, // boolean
152+
activeHeaderLinks: false, // Default: true
153153
}
154154
}
155155
```
156156

157+
::: tip
158+
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.
159+
:::
160+
157161
### Sidebar Groups
158162

159163
You can divide sidebar links into multiple groups by using objects:

docs/zh/default-theme-config/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,23 @@ sidebarDepth: 2
140140
---
141141
```
142142

143+
### 活动的标题链接
144+
145+
默认情况下,当用户通过滚动查看页面的不同部分时,嵌套的标题链接和 URL 中的 Hash 值会实时更新,这个行为可以通过以下的配置来禁用:
146+
147+
``` js
148+
module.exports = {
149+
themeConfig: {
150+
activeHeaderLinks: false, // 默认值:true
151+
}
152+
}
153+
```
154+
155+
::: tip
156+
值得一提的是,当您禁用此选项时,此功能的相应脚本将不会被加载,这也是我们性能优化的一个小点。
157+
:::
158+
159+
143160
### 侧边栏分组
144161

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

0 commit comments

Comments
 (0)