提交 003f4e87 编写于 作者: M meteorlxy

docs: refine docs of prev and next links

上级 7bc5825e
......@@ -418,7 +418,23 @@ Note that it’s `off` by default. If given a `string`, it will be displayed as
## Prev / Next Links
Prev and next links are automatically inferred based on the sidebar order of the active page. You can also explicitly overwrite or disable them globally with [theme config](/theme/default-theme-config.html#git-repository-and-edit-links) or on specific pages using `YAML front matter`:
Prev and next links are automatically inferred based on the sidebar order of the active page.
You can disable them globally with `themeConfig.nextLinks` and `themeConfig.prevLinks`:
``` js
// .vuepress/config.js
module.exports = {
themeConfig: {
// default value is true. Set it to false to hide next page links on all pages
nextLinks: false,
// default value is true. Set it to false to hide prev page links on all pages
prevLinks: false
}
}
```
You can also explicitly overwrite or disable them for individual pages with `YAML front matter`:
``` yaml
---
......@@ -451,10 +467,6 @@ module.exports = {
docsBranch: 'master',
// defaults to false, set to true to enable
editLinks: true,
// default value is true. Allows to hide next page links on all pages
nextLinks: false,
// default value is true. Allows to hide prev page links on all pages
prevLinks: false,
// custom text for edit link. Defaults to "Edit this page"
editLinkText: 'Help us improve this page!'
}
......
......@@ -402,7 +402,23 @@ module.exports = {
## 上 / 下一篇链接
上一篇和下一篇文章的链接将会自动地根据当前页面的侧边栏的顺序来获取。你也可以使用 `YAML front matter` 来明确地重写或者禁用它:
上一篇和下一篇文章的链接将会自动地根据当前页面的侧边栏的顺序来获取。
你可以通过 `themeConfig.nextLinks` 和 `themeConfig.prevLinks` 来全局禁用它们:
``` js
// .vuepress/config.js
module.exports = {
themeConfig: {
// 默认值是 true 。设置为 false 来禁用所有页面的 下一篇 链接
nextLinks: false,
// 默认值是 true 。设置为 false 来禁用所有页面的 上一篇 链接
prevLinks: false
}
}
```
你也可以使用 `YAML front matter` 来明确地重写或者禁用它们:
``` yaml
---
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册