diff --git a/docs/zh/guide/deploy.md b/docs/zh/guide/deploy.md index 75c99ed34..79ddf35ad 100644 --- a/docs/zh/guide/deploy.md +++ b/docs/zh/guide/deploy.md @@ -52,7 +52,7 @@ description: 将 VitePress 站点部署到 Netlify、Vercel、GitHub Pages 等 默认情况下,我们假设站点将部署在域名 (`/`) 的根路径上。如果站点在子路径中提供服务,例如 `https://mywebsite.com/blog/`,则需要在 VitePress 配置中将 [`base`](../reference/site-config#base) 选项设置为 `'/blog/'`。 -**例**:如果你使用的是 Github(或 GitLab)页面并部署到 `user.github.io/repo/`,请将 `base` 设置为 `/repo/`。 +**例**:如果你使用的是 GitHub(或 GitLab)页面并部署到 `user.github.io/repo/`,请将 `base` 设置为 `/repo/`。 ## HTTP 缓存标头 {#http-cache-headers} @@ -201,7 +201,7 @@ Cache-Control: max-age=31536000,immutable ### GitLab Pages -1. 如果你想部署到 `https:// .gitlab.io/ /`,将 VitePress 配置中的 `outDir` 设置为 `../public`。将 `base` 选项配置为 `'//'`。如果你部署到自定义域名、用户或组织页面,或在 GitLab 中启用了“Use unique domain”设置,则不需要 `base`。 +1. 如果你想部署到 `https://.gitlab.io//`,将 VitePress 配置中的 `outDir` 设置为 `../public`。将 `base` 选项配置为 `'//'`。如果你部署到自定义域名、用户或组织页面,或在 GitLab 中启用了“Use unique domain”设置,则不需要 `base`。 2. 在项目的根目录中创建一个名为 `.gitlab-ci.yml` 的文件,其中包含以下内容。每当你更改内容时,这都会构建和部署你的站点: diff --git a/docs/zh/guide/i18n.md b/docs/zh/guide/i18n.md index 4a5ccc590..96b16705d 100644 --- a/docs/zh/guide/i18n.md +++ b/docs/zh/guide/i18n.md @@ -55,7 +55,7 @@ interface LocaleSpecificConfig { 有关自定义默认主题的文本占位符的信息,请参考 [`DefaultTheme.Config`](https://github.com/vuejs/vitepress/blob/main/types/default-theme.d.ts) 接口。不要在 locale 级别覆盖 `themeConfig.algolia` 或 `themeConfig.carbonAds`。想获取多语言搜索的信息,请参考 [Algolia 文档](../reference/default-theme-search#i18n)。 -**提示**:配置文件也可以是 `docs/.vitepress/config/index.ts`。通过为每个语言环境创建一个配置文件,然后从 `index.ts` 合并并导出它们,可以更好的组织文件。 +**提示**:配置文件也可以是 `docs/.vitepress/config/index.ts`。通过为每个语言环境创建一个配置文件,然后从 `index.ts` 合并并导出它们,可以更好地组织文件。 ## 为本地化设置子目录 {#separate-directory-for-each-locale} @@ -79,7 +79,7 @@ docs/ /* /en/:splat 302 ``` -**提示:** 如果使用上述的方法,可以使用`nf_lang` cookie 来保存用户的语言选择。例如,可以在主题中添加以下代码: +**提示:** 如果使用上述的方法,可以使用 `nf_lang` cookie 来保存用户的语言选择。例如,可以在主题中添加以下代码: ```ts [docs/.vitepress/theme/index.ts] import DefaultTheme from 'vitepress/theme' diff --git a/docs/zh/guide/migration-from-vitepress-0.md b/docs/zh/guide/migration-from-vitepress-0.md index fc2bf97ac..64f9460e1 100644 --- a/docs/zh/guide/migration-from-vitepress-0.md +++ b/docs/zh/guide/migration-from-vitepress-0.md @@ -1,4 +1,4 @@ -n# 从 VitePress 0.x 迁移 {#migration-from-vitepress-0-x} +# 从 VitePress 0.x 迁移 {#migration-from-vitepress-0-x} 如果你来自 VitePress 0.x 版本,VitePress 有了一些重大更改。请按照本指南了解如何将应用程序迁移到最新的 VitePress。 @@ -11,13 +11,13 @@ n# 从 VitePress 0.x 迁移 {#migration-from-vitepress-0-x} - `sidebar` 选项改变了它的结构。 - `children` 现在命名为 `items`。 - 顶级侧边栏不包含 `link`。我们打算把它改回来。 -- 删除了 `repo`、`repoLabel`、`docsDir`、`docsBranch`、`editLinks`、`editLinkText`,以支持更灵活的api。 +- 删除了 `repo`、`repoLabel`、`docsDir`、`docsBranch`、`editLinks`、`editLinkText`,以支持更灵活的 API。 - 要将带有图标的 GitHub 链接添加到导航,请使用 [社交链接](../reference/default-theme-config#nav) 功能。 - 要添加“编辑此页面”功能,请使用 [编辑链接](../reference/default-theme-edit-link) 功能。 -- `lastUpdated` 选项现在分为` config.lastUpdated` 和 `themeConfig.lastUpdatedText`。 -- `carbonAds.carbon` 更改为 `carbonAds.code`. +- `lastUpdated` 选项现在分为 `config.lastUpdated` 和 `themeConfig.lastUpdatedText`。 +- `carbonAds.carbon` 更改为 `carbonAds.code`。 ## frontmatter 配置 {#frontmatter-config} - `home: true` 选项已更改为 `layout: home`。此外,还修改了许多与主页相关的设置以提供附加功能。详情请参阅 [主页指南](../reference/default-theme-home-page)。 -- `footer` 选项移至 [`themeConfig.footer`](../reference/default-theme-footer). +- `footer` 选项移至 [`themeConfig.footer`](../reference/default-theme-footer)。 diff --git a/docs/zh/guide/using-vue.md b/docs/zh/guide/using-vue.md index 4dc856d9f..6c378a8d6 100644 --- a/docs/zh/guide/using-vue.md +++ b/docs/zh/guide/using-vue.md @@ -2,7 +2,7 @@ description: 在 VitePress 的 Markdown 文件中直接使用 Vue 组件和动态模板功能。 --- -# 在 Markdown 使用 Vue {#using-vue-in-markdown} +# 在 Markdown 中使用 Vue {#using-vue-in-markdown} 在 VitePress 中,每个 Markdown 文件都被编译成 HTML,而且将其作为 [Vue 单文件组件](https://cn.vuejs.org/guide/scaling-up/sfc.html)处理。这意味着可以在 Markdown 中使用任何 Vue 功能,包括动态模板、使用 Vue 组件或通过添加 `