Skip to content

Commit a3e2958

Browse files
liruifengvHiDeoo
andauthored
i18n(zh-cn): Update plugins.md (#3104)
Co-authored-by: HiDeoo <[email protected]>
1 parent c478129 commit a3e2958

File tree

3 files changed

+39
-10
lines changed

3 files changed

+39
-10
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,19 +163,23 @@ declare namespace StarlightApp {
163163
要更新嵌套的配置值,你必须提供整个嵌套对象。
164164

165165
要扩展现有的配置选项而不是覆盖它,可以将现有值展开到新值中。
166-
在下面的例子中,通过将 `config.social` 展开到新的 `social` 对象中,向现有配置添加了一个新的 [`social`](/zh-cn/reference/configuration/#social) 媒体账号:
166+
在下面的例子中,通过将 `config.social` 展开到新的 `social` 数组中,向现有配置添加了一个新的 [`social`](/zh-cn/reference/configuration/#social) 媒体账号:
167167

168-
```ts {6-11}
168+
```ts {6-15}
169169
// plugin.ts
170170
export default {
171171
name: 'add-twitter-plugin',
172172
hooks: {
173173
'config:setup'({ config, updateConfig }) {
174174
updateConfig({
175-
social: {
175+
social: [
176176
...config.social,
177-
twitter: 'https://twitter.com/astrodotbuild',
178-
},
177+
{
178+
icon: 'twitter',
179+
label: 'Twitter',
180+
href: 'https://twitter.com/astrodotbuild',
181+
},
182+
],
179183
});
180184
},
181185
},

docs/src/content/docs/zh-cn/resources/community-content.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ import { CardGrid, LinkCard } from '@astrojs/starlight/components';
4545
title="一路开源"
4646
description="Cloudflare 是如何使用 Starlight 来升级他们的开发者文档的。"
4747
/>
48+
<LinkCard
49+
href="https://starlight-changelog.netlify.app/"
50+
title="Starlight Changelog"
51+
description="在一个精美的页面上查看 @astrojs/starlight 包的所有发布版本。"
52+
/>
4853
</CardGrid>
4954

5055
## 方案和指南

docs/src/content/docs/zh-cn/resources/plugins.mdx

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ sidebar:
5252
title="starlight-obsidian"
5353
description="将 Obsidian vaults 发布到 Starlight 网站。"
5454
/>
55-
<LinkCard
56-
href="https://astro-ghostcms.xyz/intro/starlight/install/"
57-
title="starlight-ghostcms"
58-
description="添加你的 GhostCMS 博客文章到你的 Starlight 文档。"
59-
/>
6055
<LinkCard
6156
href="https://github.com/HiDeoo/starlight-image-zoom"
6257
title="starlight-image-zoom"
@@ -132,6 +127,31 @@ sidebar:
132127
title="starlight-view-transitions"
133128
description="添加浏览器原生的跨文档视图过渡动画。"
134129
/>
130+
<LinkCard
131+
href="https://github.com/HiDeoo/starlight-auto-sidebar"
132+
title="starlight-auto-sidebar"
133+
description="调整自动生成的侧边栏组。"
134+
/>
135+
<LinkCard
136+
href="https://github.com/delucis/starlight-llms-txt"
137+
title="starlight-llms-txt"
138+
description="基于 llmstxt.org 将 llms.txt 添加到你的文档站点。"
139+
/>
140+
<LinkCard
141+
href="https://github.com/trueberryless-org/starlight-toc-overview-customizer"
142+
title="starlight-toc-overview-customizer"
143+
description="调整 Starlight的 目录,可自定义概述标题。"
144+
/>
145+
<LinkCard
146+
href="https://delucis.github.io/starlight-markdown-blocks/"
147+
title="starlight-markdown-blocks"
148+
description="扩展 Starlight 的 Markdown 旁白语法,增加自定义块类型。"
149+
/>
150+
<LinkCard
151+
href="https://github.com/WindMillCode/starlight-fullview-mode"
152+
title="starlight-fullview-mode"
153+
description="收起侧边栏,展开内容以获得全屏体验。"
154+
/>
135155
</CardGrid>
136156

137157
## 社区工具和集成

0 commit comments

Comments
 (0)