Skip to content

Commit

Permalink
docs(zh): sync and tweak translations (#3684)
Browse files Browse the repository at this point in the history
closes #3682

Co-authored-by: ZHANG PENG <onnttf@gmail.com>
  • Loading branch information
awxiaoxian2020 and onnttf committed Mar 22, 2024
1 parent 0b45abd commit 1e8b367
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/zh/guide/what-is-vitepress.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ VitePress 旨在使用 Markdown 生成内容时提供出色的开发体验。

## 性能 {#performance}

与许多传统的 SSG 不同,VitePress 生成的站点实际上是一个[单页应用程序](https://en.wikipedia.org/wiki/Single-page_application) (SPA)。
与许多传统的 SSG 不同,每次导航都会导致页面完全重新加载,VitePress 生成的网站在初次访问时提供静态 HTML,但它变成了[单页应用程序](https://en.wikipedia.org/wiki/Single-page_application)SPA)进行站点内的后续导航。我们认为,这种模式为性能提供了最佳平衡:

- **快速的初始加载**

对任何页面的初次访问都将会是静态的、预呈现的 HTML,以实现极快的加载速度和最佳的 SEO。然后页面加载一个 JavaScript bundle,将页面变成 Vue SPA (这被称为“激活”)。激活是非常快的:[PageSpeed Insights](https://pagespeed.web.dev/report?url=https%3A%2F%2Fvitepress.dev%2F) 上,典型的 VitePress 站点即使在网络速度较慢的低端移动设备上也能获得近乎完美的性能分数。
对任何页面的初次访问都将会是静态的、预呈现的 HTML,以实现极快的加载速度和最佳的 SEO。然后页面加载一个 JavaScript bundle,将页面变成 Vue SPA (这被称为“激活”)。与 SPA 激活缓慢的常见假设不同,由于 Vue 3 良好的原始性能和编译优化,这个过程实际上非常快。[PageSpeed Insights](https://pagespeed.web.dev/report?url=https%3A%2F%2Fvitepress.dev%2F) 上,典型的 VitePress 站点即使在网络速度较慢的低端移动设备上也能获得近乎完美的性能分数。

- **加载完成后可以快速切换**

Expand Down
11 changes: 9 additions & 2 deletions docs/zh/reference/site-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export default {
- 类型:`string`
- 默认值: `.`

markdown 页面的目录,相对于项目根目录。另请参阅[根目录和源目录](../guide/routing#root-and-source-directory)
相对于项目根目录的 markdown 文件所在的文件夹。另请参阅[根目录和源目录](../guide/routing#root-and-source-directory)

```ts
export default {
Expand All @@ -390,7 +390,7 @@ export default {
- 类型:`string`
- 默认值: `undefined`

用于匹配应作为源内容输出的 markdown 文件的 [全局模式](https://github.com/mrmlnc/fast-glob#pattern-syntax)
用于匹配应排除作为源内容输出的 markdown 文件,语法详见 [glob pattern](https://github.com/mrmlnc/fast-glob#pattern-syntax)

```ts
export default {
Expand Down Expand Up @@ -471,6 +471,13 @@ export default {
}
```

### metaChunk <Badge type="warning" text="experimental" />

- 类型:`boolean`
- 默认值:`false`

当设置为 `true` 时,将页面元数据提取到单独的 JavaScript 块中,而不是内联在初始 HTML 中。这使每个页面的 HTML 负载更小,并使页面元数据可缓存,从而当站点中有很多页面时可以减少服务器带宽。

### mpa <Badge type="warning" text="experimental" />

- 类型:`boolean`
Expand Down

0 comments on commit 1e8b367

Please sign in to comment.