Skip to content

Commit dcc144c

Browse files
liruifengvHiDeoo
andauthored
i18n(zh-cn): Update overrides.mdx (#2766)
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
1 parent 87f0d5c commit dcc144c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/src/content/docs/zh-cn/reference/overrides.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@ Starlight 会将以下参数传递给你的自定义组件。
6969

7070
从内容文件名生成的页面 slug。
7171

72+
此属性已废弃,将在未来的 Starlight 版本中移除。
73+
通过使用 [Starlight 的 `docsLoader`](/zh-cn/manual-setup/#配置内容集合) 迁移到新的内容层(Content Layer) API,并使用 [`id`](#id) 属性替代。
74+
7275
#### `id`
7376

7477
**类型:** `string`
7578

76-
基于内容文件名的页面的唯一 ID。
79+
当前页面的 slug 或者如果你正在使用 [`legacy.collections`](https://docs.astro.build/zh-cn/reference/legacy-flags/#collections),那么就是基于内容文件名的页面的唯一 ID。
7780

7881
#### `isFallback`
7982

@@ -103,7 +106,7 @@ entry: {
103106
}
104107
```
105108

106-
[Astro 的集合条目类型](https://docs.astro.build/zh-cn/reference/api-reference/#集合条目类型)参考中了解更多关于此对象的信息。
109+
[Astro 的集合条目类型](https://docs.astro.build/zh-cn/reference/modules/astro-content/#collectionentry)参考中了解更多关于此对象的信息。
107110

108111
#### `sidebar`
109112

@@ -195,7 +198,8 @@ entry: {
195198

196199
#### `PageFrame`
197200

198-
**默认组件:** [`PageFrame.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageFrame.astro)
201+
**默认组件:** [`PageFrame.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageFrame.astro)
202+
**命名插槽:** `header`, `sidebar`
199203

200204
包在绝大部分页面内容外的布局组件。
201205
默认实现提供了头部—侧边栏—主内容的布局,并包含 `header``sidebar` 命名插槽以及主内容的默认插槽。
@@ -209,7 +213,8 @@ entry: {
209213

210214
#### `TwoColumnContent`
211215

212-
**默认组件:** [`TwoColumnContent.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/TwoColumnContent.astro)
216+
**默认组件:** [`TwoColumnContent.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/TwoColumnContent.astro)
217+
**命名插槽:** `right-sidebar`
213218

214219
包在主内容列和右侧栏 (目录) 外的布局组件。
215220
默认实现实现了在单列、小视口布局和两列、较大视口布局之间的切换。

0 commit comments

Comments
 (0)