Skip to content

docs: remove outdated content #1694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions packages/docs/docs/theme/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,37 +374,6 @@ Note that it's `off` by default. If given a `string`, it will be displayed as a

- [@vuepress/plugin-last-updated](../plugin/official/plugin-last-updated.md)

## Service Worker

The `themeConfig.serviceWorker` option allows you to configure the service worker.

::: tip
Please do not confuse this option with [Config > serviceWorker](../config/README.md#serviceworker), [Config > serviceWorker](../config/README.md#serviceworker) is **site-level**, while this option is **theme-level**.
:::

### Popup UI to refresh contents <Badge text="0.13.0+"/> <Badge text="beta" type="warn"/>

The `themeConfig.serviceWorker.updatePopup` option enables a popup to refresh site content. The popup will be shown when the site is updated (i.e. service worker is updated). It provides a `refresh` button to allow users to refresh contents immediately.

::: tip NOTE
If without the `refresh` button, the new service worker will be active after all [clients](https://developer.mozilla.org/en-US/docs/Web/API/Clients) are closed. This means that visitors cannot see new contents until they close all tabs of your site. But the `refresh` button activates the new service worker immediately.
:::

``` js
module.exports = {
themeConfig: {
serviceWorker: {
updatePopup: true // Boolean | Object, default to undefined.
// If set to true, the default text config will be:
// updatePopup: {
// message: "New content is available.",
// buttonText: "Refresh"
// }
}
}
}
```

## 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 using `YAML front matter`:
Expand Down
31 changes: 0 additions & 31 deletions packages/docs/docs/zh/theme/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,37 +369,6 @@ module.exports = {

- [@vuepress/plugin-last-updated](../plugin/official/plugin-last-updated.md)

## Service Worker

`themeConfig.serviceWorker` 允许你去配置 Service Worker。

::: tip 提示
请不要将本选项与 [Config > serviceWorker](../config/README.md#serviceworker) 混淆,[Config > serviceWorker](../config/README.md#serviceworker) 是网站级别的配置,而本选项是主题级别的配置。
:::

### 刷新内容的弹窗 <Badge text="0.13.0+"/> <Badge text="beta" type="warn"/>

开启 `themeConfig.serviceWorker.updatePopup` 选项,将开启一个能够刷新内容的弹窗。当网站更新(即 Service Worker 更新)时,它会提供一个 `refresh` 按钮,允许用户立刻刷新内容。

::: tip 提示
如果没有 `refresh` 按钮,新的 service worker 将在所有的 [clients](https://developer.mozilla.org/en-US/docs/Web/API/Clients) 关闭后才会处于活动状态。这意味着访问者在关闭你网站的所有标签之前将无法看到新内容。但是,`refresh` 按钮可以立即激活新的 Service Worker。
:::

``` js
module.exports = {
themeConfig: {
serviceWorker: {
updatePopup: true // Boolean | Object, 默认值是 undefined.
// 如果设置为 true, 默认的文本配置将是:
// updatePopup: {
// message: "New content is available.",
// buttonText: "Refresh"
// }
}
}
}
```

## 上 / 下一篇链接

上一篇和下一篇文章的链接将会自动地根据当前页面的侧边栏的顺序来获取。你也可以使用 `YAML front matter` 来明确地重写或者禁用它:
Expand Down