Merge branch 'vuejs:main' into main

pull/3640/head
Timothy Lau 2 years ago committed by GitHub
commit ac12d7973d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -199,7 +199,7 @@ The dev server should be running at `http://localhost:5173`. Visit the URL in yo
- To better understand how markdown files are mapped to generated HTML, proceed to the [Routing Guide](./routing).
- To discover more about what you can do on the page, such as writing markdown content or using Vue Component, refer to the "Writing" section of the guide. A great place to start would be to learn about [Markdown Extensions](./markdown).
- To discover more about what you can do on the page, such as writing markdown content or using Vue Components, refer to the "Writing" section of the guide. A great place to start would be to learn about [Markdown Extensions](./markdown).
- To explore the features provided by the default documentation theme, check out the [Default Theme Config Reference](../reference/default-theme-config).

@ -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 站点即使在网络速度较慢的低端移动设备上也能获得近乎完美的性能分数。
- **加载完成后可以快速切换**

@ -377,7 +377,7 @@ export default {
- 类型:`string`
- 默认值: `.`
markdown 页面的目录,相对于项目根目录。另请参阅[根目录和源目录](../guide/routing#root-and-source-directory)。
相对于项目根目录的 markdown 文件所在的文件夹。另请参阅[根目录和源目录](../guide/routing#root-and-source-directory)。
```ts
export default {
@ -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 {
@ -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`

Loading…
Cancel
Save