diff --git a/docs/zh/guide/api.md b/docs/zh/api/index.md
similarity index 89%
rename from docs/zh/guide/api.md
rename to docs/zh/api/index.md
index c0940f91..a42293fb 100644
--- a/docs/zh/guide/api.md
+++ b/docs/zh/api/index.md
@@ -1,4 +1,4 @@
-# API 参考 {#api-reference}
+# 运行时 API 参考 {#runtime-api-reference}
VitePress 提供了几个内置 API 来获取数据。VitePress 还提供了一些可以全局使用的内置组件。
@@ -66,11 +66,11 @@ interface Router {
- **Type**: `(path: string) => string`
-将配置的 [`base`](../config/app-config#base) 添加到给定的 URL 路径。另请参阅 [Base URL](./asset-handling#base-url)。
+将配置的 [`base`](/config/app-config#base) 添加到给定的 URL 路径。另请参阅 [Base URL](/guide/asset-handling#base-url)。
## ``
-`` 组件显示渲染的 markdown 内容。这在[创建你自己的主题时](./theme-introduction)很有用。
+`` 组件显示渲染的 markdown 内容。这在[创建你自己的主题时](/guide/customization-intro)很有用。
```vue
diff --git a/docs/zh/config/app-configs.md b/docs/zh/config/app-configs.md
index b5d77279..f3718abb 100644
--- a/docs/zh/config/app-configs.md
+++ b/docs/zh/config/app-configs.md
@@ -154,6 +154,10 @@ interface MarkdownOptions extends MarkdownIt.Options {
// Enable line numbers in code block.
lineNumbers?: boolean
+ // Add support for your own languages.
+ // https://github.com/shikijs/shiki/blob/main/docs/languages.md#supporting-your-own-languages-with-shiki
+ languages?: Shiki.ILanguageRegistration
+
// markdown-it-anchor plugin options.
// See: https://github.com/valeriangalliat/markdown-it-anchor#usage
anchor?: anchorPlugin.AnchorOptions
diff --git a/docs/zh/config/theme-config.md b/docs/zh/config/theme-config.md
index 5ccf7cf8..646b9635 100644
--- a/docs/zh/config/theme-config.md
+++ b/docs/zh/config/theme-config.md
@@ -87,17 +87,23 @@ export default {
```ts
type NavItem = NavItemWithLink | NavItemWithChildren
-type NavItemWithLink = {
+interface NavItemWithLink {
text: string
link: string
activeMatch?: string
}
-interface NavItemWithChildren {
+interface NavItemChildren {
text?: string
items: NavItemWithLink[]
activeMatch?: string
}
+
+interface NavItemWithChildren {
+ text?: string
+ items: (NavItemChildren | NavItemWithLink)[]
+ activeMatch?: string
+}
```
## sidebar
diff --git a/docs/zh/guide/asset-handling.md b/docs/zh/guide/asset-handling.md
index 863e95db..a571d5bd 100644
--- a/docs/zh/guide/asset-handling.md
+++ b/docs/zh/guide/asset-handling.md
@@ -40,7 +40,7 @@
```
-在这种情况下,建议使用 VitePress 提供的 [`withBase` 辅助函数](./api#withbase) 来引用静态资源:
+在这种情况下,建议使用 VitePress 提供的 [`withBase` 辅助函数](/api/#withbase) 来引用静态资源:
```vue