diff --git a/docs/default-theme-config/README.md b/docs/default-theme-config/README.md index b803f57003..a694c135b0 100644 --- a/docs/default-theme-config/README.md +++ b/docs/default-theme-config/README.md @@ -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: diff --git a/docs/zh/default-theme-config/README.md b/docs/zh/default-theme-config/README.md index fd442d7a6b..c8268c51fe 100644 --- a/docs/zh/default-theme-config/README.md +++ b/docs/zh/default-theme-config/README.md @@ -140,6 +140,23 @@ sidebarDepth: 2 --- ``` +### 活动的标题链接 + +默认情况下,当用户通过滚动查看页面的不同部分时,嵌套的标题链接和 URL 中的 Hash 值会实时更新,这个行为可以通过以下的配置来禁用: + +``` js +module.exports = { + themeConfig: { + activeHeaderLinks: false, // 默认值:true + } +} +``` + +::: tip +值得一提的是,当您禁用此选项时,此功能的相应脚本将不会被加载,这也是我们性能优化的一个小点。 +::: + + ### 侧边栏分组 你可以通过使用**对象**来将侧边栏划分成多个组: