summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliruifengv2025-01-08 17:27:42 +0800
committerGitHub2025-01-08 10:27:42 +0100
commitdcc144c9530beaa6d163a52d03ccc20ac3d61022 (patch)
tree7ec611a1c1208ac8355872a9cd667e250579fa46
parent87f0d5cc8b8016a87931c26b059d995fc178c624 (diff)
downloadIT.starlight-dcc144c9530beaa6d163a52d03ccc20ac3d61022.tar.gz
IT.starlight-dcc144c9530beaa6d163a52d03ccc20ac3d61022.tar.bz2
IT.starlight-dcc144c9530beaa6d163a52d03ccc20ac3d61022.zip
i18n(zh-cn): Update overrides.mdx (#2766)
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
-rw-r--r--docs/src/content/docs/zh-cn/reference/overrides.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/src/content/docs/zh-cn/reference/overrides.md b/docs/src/content/docs/zh-cn/reference/overrides.md
index 256a7a70..57d00e54 100644
--- a/docs/src/content/docs/zh-cn/reference/overrides.md
+++ b/docs/src/content/docs/zh-cn/reference/overrides.md
@@ -69,11 +69,14 @@ Starlight 会将以下参数传递给你的自定义组件。
从内容文件名生成的页面 slug。
+此属性已废弃,将在未来的 Starlight 版本中移除。
+通过使用 [Starlight 的 `docsLoader`](/zh-cn/manual-setup/#配置内容集合) 迁移到新的内容层(Content Layer) API,并使用 [`id`](#id) 属性替代。
+
#### `id`
**类型:** `string`
-基于内容文件名的页面的唯一 ID。
+当前页面的 slug 或者如果你正在使用 [`legacy.collections`](https://docs.astro.build/zh-cn/reference/legacy-flags/#collections),那么就是基于内容文件名的页面的唯一 ID。
#### `isFallback`
@@ -103,7 +106,7 @@ entry: {
}
```
-在 [Astro 的集合条目类型](https://docs.astro.build/zh-cn/reference/api-reference/#集合条目类型)参考中了解更多关于此对象的信息。
+在 [Astro 的集合条目类型](https://docs.astro.build/zh-cn/reference/modules/astro-content/#collectionentry)参考中了解更多关于此对象的信息。
#### `sidebar`
@@ -195,7 +198,8 @@ entry: {
#### `PageFrame`
-**默认组件:** [`PageFrame.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageFrame.astro)
+**默认组件:** [`PageFrame.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageFrame.astro)
+**命名插槽:** `header`, `sidebar`
包在绝大部分页面内容外的布局组件。
默认实现提供了头部—侧边栏—主内容的布局,并包含 `header` 和 `sidebar` 命名插槽以及主内容的默认插槽。
@@ -209,7 +213,8 @@ entry: {
#### `TwoColumnContent`
-**默认组件:** [`TwoColumnContent.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/TwoColumnContent.astro)
+**默认组件:** [`TwoColumnContent.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/TwoColumnContent.astro)
+**命名插槽:** `right-sidebar`
包在主内容列和右侧栏 (目录) 外的布局组件。
默认实现实现了在单列、小视口布局和两列、较大视口布局之间的切换。