Skip to content

Commit 6bfc0e2

Browse files
kidonngulivz
authored andcommitted
docs: remove outdated content (#1694)
1 parent 834010e commit 6bfc0e2

File tree

2 files changed

+0
-62
lines changed

2 files changed

+0
-62
lines changed

packages/docs/docs/theme/default-theme-config.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -374,37 +374,6 @@ Note that it's `off` by default. If given a `string`, it will be displayed as a
374374

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

377-
## Service Worker
378-
379-
The `themeConfig.serviceWorker` option allows you to configure the service worker.
380-
381-
::: tip
382-
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**.
383-
:::
384-
385-
### Popup UI to refresh contents <Badge text="0.13.0+"/> <Badge text="beta" type="warn"/>
386-
387-
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.
388-
389-
::: tip NOTE
390-
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.
391-
:::
392-
393-
``` js
394-
module.exports = {
395-
themeConfig: {
396-
serviceWorker: {
397-
updatePopup: true // Boolean | Object, default to undefined.
398-
// If set to true, the default text config will be:
399-
// updatePopup: {
400-
// message: "New content is available.",
401-
// buttonText: "Refresh"
402-
// }
403-
}
404-
}
405-
}
406-
```
407-
408377
## Prev / Next Links
409378

410379
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`:

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

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -369,37 +369,6 @@ module.exports = {
369369

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

372-
## Service Worker
373-
374-
`themeConfig.serviceWorker` 允许你去配置 Service Worker。
375-
376-
::: tip 提示
377-
请不要将本选项与 [Config > serviceWorker](../config/README.md#serviceworker) 混淆,[Config > serviceWorker](../config/README.md#serviceworker) 是网站级别的配置,而本选项是主题级别的配置。
378-
:::
379-
380-
### 刷新内容的弹窗 <Badge text="0.13.0+"/> <Badge text="beta" type="warn"/>
381-
382-
开启 `themeConfig.serviceWorker.updatePopup` 选项,将开启一个能够刷新内容的弹窗。当网站更新(即 Service Worker 更新)时,它会提供一个 `refresh` 按钮,允许用户立刻刷新内容。
383-
384-
::: tip 提示
385-
如果没有 `refresh` 按钮,新的 service worker 将在所有的 [clients](https://developer.mozilla.org/en-US/docs/Web/API/Clients) 关闭后才会处于活动状态。这意味着访问者在关闭你网站的所有标签之前将无法看到新内容。但是,`refresh` 按钮可以立即激活新的 Service Worker。
386-
:::
387-
388-
``` js
389-
module.exports = {
390-
themeConfig: {
391-
serviceWorker: {
392-
updatePopup: true // Boolean | Object, 默认值是 undefined.
393-
// 如果设置为 true, 默认的文本配置将是:
394-
// updatePopup: {
395-
// message: "New content is available.",
396-
// buttonText: "Refresh"
397-
// }
398-
}
399-
}
400-
}
401-
```
402-
403372
## 上 / 下一篇链接
404373

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

0 commit comments

Comments
 (0)