diff --git a/.changeset/hip-needles-tell.md b/.changeset/hip-needles-tell.md
new file mode 100644
index 00000000000..97b63efc050
--- /dev/null
+++ b/.changeset/hip-needles-tell.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/starlight': patch
+---
+
+Improve Russian language support
diff --git a/.github/labeler.yml b/.github/labeler.yml
index c7d5f4445e9..f1c10513a92 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -9,7 +9,7 @@ i18n:
- docs/src/content/docs/fr/**/*
- docs/src/content/docs/it/**/*
- docs/src/content/docs/ja/**/*
- - docs/src/content/docs/zh/**/*
+ - docs/src/content/docs/zh-cn/**/*
- docs/src/content/docs/pt-br/**/*
- docs/src/content/docs/ko/**/*
- docs/src/content/docs/ru/**/*
diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs
index d275e25c656..857d5c732b9 100644
--- a/docs/astro.config.mjs
+++ b/docs/astro.config.mjs
@@ -9,7 +9,7 @@ export const locales = {
fr: { label: 'Français', lang: 'fr' },
it: { label: 'Italiano', lang: 'it' },
id: { label: 'Bahasa Indonesia', lang: 'id' },
- zh: { label: '简体中文', lang: 'zh' },
+ 'zh-cn': { label: '简体中文', lang: 'zh-CN' },
'pt-br': { label: 'Português do Brasil', lang: 'pt-BR' },
ko: { label: '한국어', lang: 'ko' },
ru: { label: 'Русский', lang: 'ru' },
@@ -64,7 +64,7 @@ export default defineConfig({
fr: 'Commencez ici',
it: 'Inizia qui',
id: 'Mulai dari sini',
- zh: '从这里开始',
+ 'zh-CN': '从这里开始',
'pt-BR': 'Comece Aqui',
ko: '여기서부터',
ru: 'Начать отсюда',
@@ -80,7 +80,7 @@ export default defineConfig({
fr: 'Mise en route',
it: 'Iniziamo',
id: 'Memulai',
- zh: '开始使用',
+ 'zh-CN': '开始使用',
'pt-BR': 'Introdução',
ko: '시작하기',
ru: 'Введение',
@@ -96,7 +96,7 @@ export default defineConfig({
fr: 'Installation manuelle',
// it: 'Manual Setup',
id: 'Instalasi Manual',
- zh: '手动配置',
+ 'zh-CN': '手动配置',
'pt-BR': 'Instalação Manual',
ko: '수동으로 설정하기',
ru: 'Установка вручную',
@@ -112,7 +112,7 @@ export default defineConfig({
fr: 'Impact environnemental',
it: 'Impatto ambientale',
id: 'Dampak terhadap lingkungan',
- zh: '环境影响',
+ 'zh-CN': '环境影响',
'pt-BR': 'Impacto Ambiental',
ko: '환경적 영향',
ru: 'Влияние на окружающую среду',
@@ -143,7 +143,7 @@ export default defineConfig({
fr: 'Guides',
it: 'Guide',
id: 'Petunjuk Penggunaan',
- zh: '指南',
+ 'zh-CN': '指南',
'pt-BR': 'Guias',
ko: '가이드',
ru: 'Руководства',
@@ -159,7 +159,7 @@ export default defineConfig({
fr: 'Référence',
it: 'Riferimenti',
id: 'Referensi',
- zh: '参考',
+ 'zh-CN': '参考',
'pt-BR': 'Referência',
ko: '참조',
ru: 'Справочник',
diff --git a/docs/package.json b/docs/package.json
index 4315f90deaf..34ecd356744 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -5,7 +5,7 @@
"version": "0.0.1",
"scripts": {
"test": "start-server-and-test 'pnpm preview' http://localhost:4321 'pnpm pa11y'",
- "pa11y": "pa11y-ci --sitemap 'http://localhost:4321/sitemap-0.xml' --sitemap-find 'https://starlight.astro.build' --sitemap-replace 'http://localhost:4321' --sitemap-exclude '/(de|zh|fr|es|pt-br|it|id|ko|ru)/.*'",
+ "pa11y": "pa11y-ci --sitemap 'http://localhost:4321/sitemap-0.xml' --sitemap-find 'https://starlight.astro.build' --sitemap-replace 'http://localhost:4321' --sitemap-exclude '/(de|zh-cn|fr|es|pt-br|it|id|ko|ru)/.*'",
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
diff --git a/docs/public/_redirects b/docs/public/_redirects
index 3d094687795..a7aa40820f3 100644
--- a/docs/public/_redirects
+++ b/docs/public/_redirects
@@ -1,2 +1,3 @@
/ph/* https://astro-houston-ph.pages.dev/ph/:splat 200
+/zh/* /zh-cn/:splat
/:lang/* /:lang/404/ 404
diff --git a/docs/src/content/docs/de/reference/configuration.md b/docs/src/content/docs/de/reference/configuration.md
index de88c323a74..a7a4f17cf3d 100644
--- a/docs/src/content/docs/de/reference/configuration.md
+++ b/docs/src/content/docs/de/reference/configuration.md
@@ -217,8 +217,8 @@ export default defineConfig({
en: {
label: 'English',
},
- // Chinesische Seiten in `src/content/docs/zh/`
- zh: {
+ // Chinesische Seiten in `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
diff --git a/docs/src/content/docs/es/guides/i18n.mdx b/docs/src/content/docs/es/guides/i18n.mdx
index eb5bb62d546..aab6d33e21a 100644
--- a/docs/src/content/docs/es/guides/i18n.mdx
+++ b/docs/src/content/docs/es/guides/i18n.mdx
@@ -27,8 +27,8 @@ Starlight proporciona soporte incorporado para sitios multilingües, incluidas l
en: {
label: 'English',
},
- // Chino simplificado en `src/content/docs/zh/`
- zh: {
+ // Chino simplificado en `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -55,7 +55,7 @@ Starlight proporciona soporte incorporado para sitios multilingües, incluidas l
- docs/
- ar/
- en/
- - zh/
+ - zh-cn/
@@ -84,7 +84,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // lang es obligatorio para los locales raíz
},
- zh: {
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -102,7 +102,7 @@ Cuando uses una `root` locale, mantén las páginas para ese idioma directamente
- content/
- docs/
- **index.md**
- - zh/
+ - zh-cn/
- **index.md**
diff --git a/docs/src/content/docs/es/reference/configuration.md b/docs/src/content/docs/es/reference/configuration.md
index 362c45b5d80..fbfffe2510e 100644
--- a/docs/src/content/docs/es/reference/configuration.md
+++ b/docs/src/content/docs/es/reference/configuration.md
@@ -231,8 +231,8 @@ export default defineConfig({
en: {
label: 'English',
},
- // Los documentos en chino simplificado en `src/content/docs/zh/`
- zh: {
+ // Los documentos en chino simplificado en `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
diff --git a/docs/src/content/docs/es/reference/overrides.md b/docs/src/content/docs/es/reference/overrides.md
index 0cf193cb022..3aad36a2f61 100644
--- a/docs/src/content/docs/es/reference/overrides.md
+++ b/docs/src/content/docs/es/reference/overrides.md
@@ -42,7 +42,7 @@ La dirección de escritura de la página.
**Tipo:** `string`
-Etiqueta de idioma BCP-47 para la configuración regional de esta página, por ejemplo, `en`, `zh` o `pt-BR`.
+Etiqueta de idioma BCP-47 para la configuración regional de esta página, por ejemplo, `en`, `zh-CN` o `pt-BR`.
#### `locale`
diff --git a/docs/src/content/docs/fr/guides/i18n.mdx b/docs/src/content/docs/fr/guides/i18n.mdx
index 28c95118fbd..ba27a2d32cf 100644
--- a/docs/src/content/docs/fr/guides/i18n.mdx
+++ b/docs/src/content/docs/fr/guides/i18n.mdx
@@ -27,8 +27,8 @@ Starlight offre une prise en charge intégrée des sites multilingues, y compris
en: {
label: 'English',
},
- // Docs en chinois simplifié dans `src/content/docs/zh/`
- zh: {
+ // Docs en chinois simplifié dans `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -55,7 +55,7 @@ Starlight offre une prise en charge intégrée des sites multilingues, y compris
- docs/
- ar/
- en/
- - zh/
+ - zh-cn/
@@ -84,7 +84,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // lang est nécessaire pour les locales de la racine
},
- zh: {
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -102,7 +102,7 @@ Lorsque vous utilisez une locale `root`, gardez les pages pour cette langue dire
- content/
- docs/
- **index.md**
- - zh/
+ - zh-cn/
- **index.md**
diff --git a/docs/src/content/docs/fr/reference/configuration.md b/docs/src/content/docs/fr/reference/configuration.md
index 41596c87e70..e8cb8e70de3 100644
--- a/docs/src/content/docs/fr/reference/configuration.md
+++ b/docs/src/content/docs/fr/reference/configuration.md
@@ -230,8 +230,8 @@ export default defineConfig({
en: {
label: 'English',
},
- // Documentations en Chinois simplifié se trouve dans `src/content/docs/zh/`
- zh: {
+ // Documentations en Chinois simplifié se trouve dans `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
diff --git a/docs/src/content/docs/guides/i18n.mdx b/docs/src/content/docs/guides/i18n.mdx
index 0819703e2e9..2020256943c 100644
--- a/docs/src/content/docs/guides/i18n.mdx
+++ b/docs/src/content/docs/guides/i18n.mdx
@@ -27,8 +27,8 @@ Starlight provides built-in support for multilingual sites, including routing, f
en: {
label: 'English',
},
- // Simplified Chinese docs in `src/content/docs/zh/`
- zh: {
+ // Simplified Chinese docs in `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -55,7 +55,7 @@ Starlight provides built-in support for multilingual sites, including routing, f
- docs/
- ar/
- en/
- - zh/
+ - zh-cn/
@@ -84,7 +84,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // lang is required for root locales
},
- zh: {
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -102,7 +102,7 @@ When using a `root` locale, keep pages for that language directly in `src/conten
- content/
- docs/
- **index.md**
- - zh/
+ - zh-cn/
- **index.md**
diff --git a/docs/src/content/docs/it/guides/i18n.mdx b/docs/src/content/docs/it/guides/i18n.mdx
index c9ce07965e1..0e5f9130570 100644
--- a/docs/src/content/docs/it/guides/i18n.mdx
+++ b/docs/src/content/docs/it/guides/i18n.mdx
@@ -27,8 +27,8 @@ Starlight offre il supporto per siti multilingua, compreso di indirizzamento, co
en: {
label: 'English',
},
- // La documentazione in cinese semplificato si trova in `src/content/docs/zh/`
- zh: {
+ // La documentazione in cinese semplificato si trova in `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -55,7 +55,7 @@ Starlight offre il supporto per siti multilingua, compreso di indirizzamento, co
- docs/
- ar/
- en/
- - zh/
+ - zh-cn/
@@ -84,7 +84,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // necessario per root
},
- zh: {
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -102,7 +102,7 @@ Quando si usa una lingua `root`, metti le pagine direttamente in `src/content/do
- content/
- docs/
- **index.md**
- - zh/
+ - zh-cn/
- **index.md**
diff --git a/docs/src/content/docs/it/reference/configuration.md b/docs/src/content/docs/it/reference/configuration.md
index 950e7cf0106..b3c302abaca 100644
--- a/docs/src/content/docs/it/reference/configuration.md
+++ b/docs/src/content/docs/it/reference/configuration.md
@@ -229,8 +229,8 @@ export default defineConfig({
en: {
label: 'English',
},
- // La documentazione in cinese semplificato si trova in `src/content/docs/zh/`
- zh: {
+ // La documentazione in cinese semplificato si trova in `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
diff --git a/docs/src/content/docs/ja/guides/i18n.mdx b/docs/src/content/docs/ja/guides/i18n.mdx
index e0ae32fc525..48c500cbd48 100644
--- a/docs/src/content/docs/ja/guides/i18n.mdx
+++ b/docs/src/content/docs/ja/guides/i18n.mdx
@@ -27,8 +27,8 @@ Starlightは、ルーティング、フォールバックコンテンツ、右
en: {
label: 'English',
},
- // 簡体字中国語のドキュメントは`src/content/docs/zh/`に置きます。
- zh: {
+ // 簡体字中国語のドキュメントは`src/content/docs/zh-cn/`に置きます。
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -54,7 +54,7 @@ Starlightは、ルーティング、フォールバックコンテンツ、右
- docs/
- ar/
- en/
- - zh/
+ - zh-cn/
@@ -83,7 +83,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // langはルートロケールに必要です
},
- zh: {
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -101,7 +101,7 @@ export default defineConfig({
- content/
- docs/
- **index.md**
- - zh/
+ - zh-cn/
- **index.md**
diff --git a/docs/src/content/docs/ja/reference/configuration.md b/docs/src/content/docs/ja/reference/configuration.md
index 6f492af38ce..0e8a54e1bf1 100644
--- a/docs/src/content/docs/ja/reference/configuration.md
+++ b/docs/src/content/docs/ja/reference/configuration.md
@@ -226,8 +226,8 @@ export default defineConfig({
en: {
label: 'English',
},
- // 簡体字中国語のドキュメントは`src/content/docs/zh/`にあります。
- zh: {
+ // 簡体字中国語のドキュメントは`src/content/docs/zh-cn/`にあります。
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
diff --git a/docs/src/content/docs/ko/guides/i18n.mdx b/docs/src/content/docs/ko/guides/i18n.mdx
index 08dc9f07e7f..5a1bfde0b1e 100644
--- a/docs/src/content/docs/ko/guides/i18n.mdx
+++ b/docs/src/content/docs/ko/guides/i18n.mdx
@@ -27,8 +27,8 @@ Starlight는 라우팅, 대체 콘텐츠 및 전체 RTL(오른쪽에서 왼쪽
en: {
label: 'English',
},
- // 중국어 간체 문서는 `src/content/docs/zh/`에 있습니다.
- zh: {
+ // 중국어 간체 문서는 `src/content/docs/zh-cn/`에 있습니다.
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -54,7 +54,7 @@ Starlight는 라우팅, 대체 콘텐츠 및 전체 RTL(오른쪽에서 왼쪽
- docs/
- ar/
- en/
- - zh/
+ - zh-cn/
@@ -83,7 +83,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // 루트 로케일은 lang이 반드시 필요합니다.
},
- zh: {
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -101,7 +101,7 @@ export default defineConfig({
- content/
- docs/
- **index.md**
- - zh/
+ - zh-cn/
- **index.md**
diff --git a/docs/src/content/docs/ko/reference/configuration.md b/docs/src/content/docs/ko/reference/configuration.md
index 1088a02f547..c909f8dcfa5 100644
--- a/docs/src/content/docs/ko/reference/configuration.md
+++ b/docs/src/content/docs/ko/reference/configuration.md
@@ -233,8 +233,8 @@ export default defineConfig({
label: 'English',
lang: 'en',
},
- // 중국어 간체 문서는 `src/content/docs/zh/`에 있습니다.
- zh: {
+ // 중국어 간체 문서는 `src/content/docs/zh-cn/`에 있습니다.
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
diff --git a/docs/src/content/docs/ko/reference/overrides.md b/docs/src/content/docs/ko/reference/overrides.md
index 0026824ac20..d3f434a801a 100644
--- a/docs/src/content/docs/ko/reference/overrides.md
+++ b/docs/src/content/docs/ko/reference/overrides.md
@@ -39,7 +39,7 @@ Starlight는 사용자 정의 컴포넌트에 다음 속성들을 전달합니
**타입:** `string`
-이 페이지의 로케일에 대한 BCP-47 언어 태그입니다. 예: `en`, `zh` 또는 `pt-BR`
+이 페이지의 로케일에 대한 BCP-47 언어 태그입니다. 예: `en`, `zh-CN` 또는 `pt-BR`
#### `locale`
diff --git a/docs/src/content/docs/pt-br/guides/i18n.mdx b/docs/src/content/docs/pt-br/guides/i18n.mdx
index 2f004eb5cc7..10d24590752 100644
--- a/docs/src/content/docs/pt-br/guides/i18n.mdx
+++ b/docs/src/content/docs/pt-br/guides/i18n.mdx
@@ -27,8 +27,8 @@ Starlight providencia suporte integrado para sites multilíngue, incluindo rotea
pt: {
label: 'Português',
},
- // Documentação em Chinês Simplificado em `src/content/docs/zh/`
- zh: {
+ // Documentação em Chinês Simplificado em `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -55,7 +55,7 @@ Starlight providencia suporte integrado para sites multilíngue, incluindo rotea
- docs/
- ar/
- pt/
- - zh/
+ - zh-cn/
@@ -84,7 +84,7 @@ export default defineConfig({
label: 'Português',
lang: 'pt', // lang é obrigatório para locais raiz
},
- zh: {
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -102,7 +102,7 @@ Ao utilizar um local `root`, mantenha as páginas para aquela língua diretament
- content/
- docs/
- **index.md**
- - zh/
+ - zh-cn/
- **index.md**
diff --git a/docs/src/content/docs/pt-br/reference/configuration.md b/docs/src/content/docs/pt-br/reference/configuration.md
index 3402b754fcf..2d9ce8b7e2f 100644
--- a/docs/src/content/docs/pt-br/reference/configuration.md
+++ b/docs/src/content/docs/pt-br/reference/configuration.md
@@ -229,8 +229,8 @@ export default defineConfig({
en: {
label: 'English',
},
- // Documentação em Chinês Simplificado em `src/content/docs/zh/`
- zh: {
+ // Documentação em Chinês Simplificado em `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
diff --git a/docs/src/content/docs/reference/configuration.mdx b/docs/src/content/docs/reference/configuration.mdx
index c6bc18147c8..9eea45667d5 100644
--- a/docs/src/content/docs/reference/configuration.mdx
+++ b/docs/src/content/docs/reference/configuration.mdx
@@ -230,8 +230,8 @@ export default defineConfig({
en: {
label: 'English',
},
- // Simplified Chinese docs in `src/content/docs/zh/`
- zh: {
+ // Simplified Chinese docs in `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
diff --git a/docs/src/content/docs/reference/overrides.md b/docs/src/content/docs/reference/overrides.md
index 6b2ea2c42b0..e339b3ae51c 100644
--- a/docs/src/content/docs/reference/overrides.md
+++ b/docs/src/content/docs/reference/overrides.md
@@ -41,7 +41,7 @@ Page writing direction.
**Type:** `string`
-BCP-47 language tag for this page’s locale, e.g. `en`, `zh`, or `pt-BR`.
+BCP-47 language tag for this page’s locale, e.g. `en`, `zh-CN`, or `pt-BR`.
#### `locale`
diff --git a/docs/src/content/docs/zh/404.md b/docs/src/content/docs/zh-cn/404.md
similarity index 93%
rename from docs/src/content/docs/zh/404.md
rename to docs/src/content/docs/zh-cn/404.md
index c72eb160ec4..a9ca63e38f5 100644
--- a/docs/src/content/docs/zh/404.md
+++ b/docs/src/content/docs/zh-cn/404.md
@@ -8,6 +8,6 @@ hero:
actions:
- text: 返回首页
icon: right-arrow
- link: /zh/
+ link: /zh-cn/
variant: primary
---
diff --git a/docs/src/content/docs/zh/environmental-impact.md b/docs/src/content/docs/zh-cn/environmental-impact.md
similarity index 100%
rename from docs/src/content/docs/zh/environmental-impact.md
rename to docs/src/content/docs/zh-cn/environmental-impact.md
diff --git a/docs/src/content/docs/zh/getting-started.mdx b/docs/src/content/docs/zh-cn/getting-started.mdx
similarity index 86%
rename from docs/src/content/docs/zh/getting-started.mdx
rename to docs/src/content/docs/zh-cn/getting-started.mdx
index 0ac93fb94d5..d2d06db0cb9 100644
--- a/docs/src/content/docs/zh/getting-started.mdx
+++ b/docs/src/content/docs/zh-cn/getting-started.mdx
@@ -38,7 +38,7 @@ yarn create astro --template starlight
-这将创建一个新的 [项目目录](/zh/guides/project-structure/),其中包含你网站所需的所有文件和配置。
+这将创建一个新的 [项目目录](/zh-cn/guides/project-structure/),其中包含你网站所需的所有文件和配置。
:::tip[查看实际效果]
在浏览器中尝试 Starlight:
@@ -51,7 +51,7 @@ Starlight 已经准备好让你添加新的内容,或者将你现有的文件
### 文件格式
-Starlight 支持使用 Markdown 和 MDX 来编写内容。(你可以通过安装实验性的 [Astro Markdoc 集成](https://docs.astro.build/en/guides/integrations-guide/markdoc/) 来添加对 Markdoc 的支持。)
+Starlight 支持使用 Markdown 和 MDX 来编写内容。(你可以通过安装实验性的 [Astro Markdoc 集成](https://docs.astro.build/zh-cn/guides/integrations-guide/markdoc/) 来添加对 Markdoc 的支持。)
### 添加页面
@@ -64,7 +64,7 @@ src/content/docs/guides/faq.md => your-site.com/guides/faq
### 类型安全的 frontmatter
-所有 Starlight 页面都共享一个可自定义的 [frontmatter 属性集](/zh/reference/frontmatter/),用于控制页面的外观:
+所有 Starlight 页面都共享一个可自定义的 [frontmatter 属性集](/zh-cn/reference/frontmatter/),用于控制页面的外观:
```md
---
@@ -120,7 +120,7 @@ yarn upgrade @astrojs/starlight --latest
## Starlight 故障排除
-本站点的参考部分提供了 Starlight [项目配置](/zh/reference/configuration/)和[单个页面 frontmatter 配置](/zh/reference/frontmatter/)信息。使用这些页面来确保你的 Starlight 网站已正确配置和运行。
+本站点的参考部分提供了 Starlight [项目配置](/zh-cn/reference/configuration/)和[单个页面 frontmatter 配置](/zh-cn/reference/frontmatter/)信息。使用这些页面来确保你的 Starlight 网站已正确配置和运行。
请参阅侧边栏中不断增长的指南列表,以获取有关添加内容和自定义 Starlight 网站的帮助。
diff --git a/docs/src/content/docs/zh/guides/authoring-content.md b/docs/src/content/docs/zh-cn/guides/authoring-content.md
similarity index 96%
rename from docs/src/content/docs/zh/guides/authoring-content.md
rename to docs/src/content/docs/zh-cn/guides/authoring-content.md
index 68eec5bd39b..f2029a04578 100644
--- a/docs/src/content/docs/zh/guides/authoring-content.md
+++ b/docs/src/content/docs/zh-cn/guides/authoring-content.md
@@ -15,10 +15,10 @@ Starlight 支持在 `.md` 文件中使用完整的 [Markdown](https://daringfire
文本可以是**粗体**,_斜体_,或~~删除线~~。
```
-你可以 [链接到另一个页面](/zh/getting-started/)。
+你可以 [链接到另一个页面](/zh-cn/getting-started/)。
```md
-你可以 [链接到另一个页面](/zh/getting-started/)。
+你可以 [链接到另一个页面](/zh-cn/getting-started/)。
```
你可以使用反引号高亮 `内联代码`。
@@ -146,7 +146,7 @@ Caution 和 danger 旁白有助于吸引用户注意可能绊倒他们的细节
- 清晰的导航
- 用户可配置的颜色主题
-- [i18n 支持](/zh/guides/i18n)
+- [i18n 支持](/zh-cn/guides/i18n)
:::
@@ -160,7 +160,7 @@ Caution 和 danger 旁白有助于吸引用户注意可能绊倒他们的细节
- 清晰的导航
- 用户可配置的颜色主题
-- [i18n 支持](/zh/guides/i18n)
+- [i18n 支持](/zh-cn/guides/i18n)
:::
```
diff --git a/docs/src/content/docs/zh/guides/components.mdx b/docs/src/content/docs/zh-cn/guides/components.mdx
similarity index 94%
rename from docs/src/content/docs/zh/guides/components.mdx
rename to docs/src/content/docs/zh-cn/guides/components.mdx
index 7e2bc35370a..66082ba6bf8 100644
--- a/docs/src/content/docs/zh/guides/components.mdx
+++ b/docs/src/content/docs/zh-cn/guides/components.mdx
@@ -138,12 +138,12 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components';
{ \[dir: string\]: [LocaleConfig](#localeconfig) }
-为你的网站设置支持的 `locales` 来[配置国际化(i18n)](/zh/guides/i18n/)。
+为你的网站设置支持的 `locales` 来[配置国际化(i18n)](/zh-cn/guides/i18n/)。
每个条目都应该使用该语言文件保存的目录作为 key。
@@ -228,8 +228,8 @@ export default defineConfig({
en: {
label: 'English',
},
- // 简体中文文档在 `src/content/docs/zh/`
- zh: {
+ // 简体中文文档在 `src/content/docs/zh-cn/`
+ 'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
@@ -382,7 +382,7 @@ interface HeadConfig {
控制页脚是否显示页面上次更新的时间。
-默认情况下,此功能依赖于你的存储库的 Git 历史记录,并且在某些执行[浅克隆](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt)的部署平台上可能不准确。页面可以使用 [`lastUpdated` frontmatter 字段](/zh/reference/frontmatter/#lastupdated)覆盖此设置或基于 Git 的日期。
+默认情况下,此功能依赖于你的存储库的 Git 历史记录,并且在某些执行[浅克隆](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt)的部署平台上可能不准确。页面可以使用 [`lastUpdated` frontmatter 字段](/zh-cn/reference/frontmatter/#lastupdated)覆盖此设置或基于 Git 的日期。
### `pagination`
@@ -391,7 +391,7 @@ interface HeadConfig {
定义页脚是否应包含上一页和下一页的链接。
-页面可以使用 [`prev`](/zh/reference/frontmatter/#prev) 和 [`next`](/zh/reference/frontmatter/#next) frontmatter 字段覆盖此设置或链接文本和/或 URL。
+页面可以使用 [`prev`](/zh-cn/reference/frontmatter/#prev) 和 [`next`](/zh-cn/reference/frontmatter/#next) frontmatter 字段覆盖此设置或链接文本和/或 URL。
### `favicon`
@@ -449,4 +449,4 @@ starlight({
});
```
-要查阅所有可覆盖的组件,请参阅[覆盖参考](/zh/reference/overrides/)。
+要查阅所有可覆盖的组件,请参阅[覆盖参考](/zh-cn/reference/overrides/)。
diff --git a/docs/src/content/docs/zh/reference/frontmatter.md b/docs/src/content/docs/zh-cn/reference/frontmatter.md
similarity index 82%
rename from docs/src/content/docs/zh/reference/frontmatter.md
rename to docs/src/content/docs/zh-cn/reference/frontmatter.md
index 03b7a1c5588..867c28ef970 100644
--- a/docs/src/content/docs/zh/reference/frontmatter.md
+++ b/docs/src/content/docs/zh-cn/reference/frontmatter.md
@@ -32,13 +32,13 @@ description: 了解更多关于此项目的信息。
**类型:** `string | boolean`
-覆盖[全局 `editLink` 配置](/zh/reference/configuration/#editlink)。设置为 false 可禁用特定页面的 “编辑页面” 链接,或提供此页面内容可编辑的备用 URL。
+覆盖[全局 `editLink` 配置](/zh-cn/reference/configuration/#editlink)。设置为 false 可禁用特定页面的 “编辑页面” 链接,或提供此页面内容可编辑的备用 URL。
### `head`
-**类型:** [`HeadConfig[]`](/zh/reference/configuration/#headconfig)
+**类型:** [`HeadConfig[]`](/zh-cn/reference/configuration/#headconfig)
-你可以使用 `
string | BadgeConfig
+**类型:** string | BadgeConfig
当在自动生成的链接组中显示时,在侧边栏中为页面添加徽章。
-当使用字符串时,徽章将显示为默认的强调色。可选择的,传递一个 [`BadgeConfig` 对象](/zh/reference/configuration/#badgeconfig) ,其中包含 `text` 和 `variant` 字段,可以自定义徽章。
+当使用字符串时,徽章将显示为默认的强调色。可选择的,传递一个 [`BadgeConfig` 对象](/zh-cn/reference/configuration/#badgeconfig) ,其中包含 `text` 和 `variant` 字段,可以自定义徽章。
```md
---
diff --git a/docs/src/content/docs/zh/reference/overrides.md b/docs/src/content/docs/zh-cn/reference/overrides.md
similarity index 94%
rename from docs/src/content/docs/zh/reference/overrides.md
rename to docs/src/content/docs/zh-cn/reference/overrides.md
index fa09f71bc25..0861ba67b93 100644
--- a/docs/src/content/docs/zh/reference/overrides.md
+++ b/docs/src/content/docs/zh-cn/reference/overrides.md
@@ -5,10 +5,10 @@ tableOfContents:
maxHeadingLevel: 4
---
-你可以通过在 Starlight 的 [`components`](/zh/reference/configuration/#components) 配置选项中提供替代组件的路径来替换掉 (即重写) Starlight 的内置组件。
+你可以通过在 Starlight 的 [`components`](/zh-cn/reference/configuration/#components) 配置选项中提供替代组件的路径来替换掉 (即重写) Starlight 的内置组件。
本页面列出了所有可被重写的组件和它们默认实现的 GitHub 链接。
-在[重写组件指南](/zh/guides/overriding-components/)中了解更多。
+在[重写组件指南](/zh-cn/guides/overriding-components/)中了解更多。
## 组件参数
@@ -41,7 +41,7 @@ Starlight 会将以下参数传递给你的自定义组件。
**类型:** `string`
-当前页面的 BCP-47 语言标签,例如 `en`、`zh` 或 `pt-BR`。
+当前页面的 BCP-47 语言标签,例如 `en`、`zh-CN` 或 `pt-BR`。
#### `locale`
@@ -151,7 +151,7 @@ entry: {
包含 `