diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e88f9d3dc68..5a80056bd417 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.0.2](https://github.com/vuejs/vitepress/compare/v1.0.1...v1.0.2) (2024-04-01) + +### Bug Fixes + +- **theme:** text containing html not showing properly in mobile nav menu ([3c8b4c7](https://github.com/vuejs/vitepress/commit/3c8b4c706051592dd2cca0ae57e293254cbb51ce)) + ## [1.0.1](https://github.com/vuejs/vitepress/compare/v1.0.0...v1.0.1) (2024-03-22) ### Bug Fixes diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index a2541bd46db2..a5f1c7afdeed 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -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). diff --git a/docs/zh/guide/what-is-vitepress.md b/docs/zh/guide/what-is-vitepress.md index 94da4123949f..cee35162dfba 100644 --- a/docs/zh/guide/what-is-vitepress.md +++ b/docs/zh/guide/what-is-vitepress.md @@ -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 站点即使在网络速度较慢的低端移动设备上也能获得近乎完美的性能分数。 - **加载完成后可以快速切换** diff --git a/docs/zh/reference/site-config.md b/docs/zh/reference/site-config.md index 56b469289a38..5eb2978774b2 100644 --- a/docs/zh/reference/site-config.md +++ b/docs/zh/reference/site-config.md @@ -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 + +- 类型:`boolean` +- 默认值:`false` + +当设置为 `true` 时,将页面元数据提取到单独的 JavaScript 块中,而不是内联在初始 HTML 中。这使每个页面的 HTML 负载更小,并使页面元数据可缓存,从而当站点中有很多页面时可以减少服务器带宽。 + ### mpa - 类型:`boolean` diff --git a/package.json b/package.json index 5a12389c542f..456d45058e4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vitepress", - "version": "1.0.1", + "version": "1.0.2", "description": "Vite & Vue powered static site generator", "type": "module", "packageManager": "pnpm@8.15.5", diff --git a/src/client/theme-default/components/VPNavScreenMenuLink.vue b/src/client/theme-default/components/VPNavScreenMenuLink.vue index e612361e4665..e3d54cb1b18b 100644 --- a/src/client/theme-default/components/VPNavScreenMenuLink.vue +++ b/src/client/theme-default/components/VPNavScreenMenuLink.vue @@ -17,9 +17,8 @@ const closeScreen = inject('close-screen') as () => void :target="item.target" :rel="item.rel" @click="closeScreen" - > - {{ item.text }} - + v-html="item.text" + />