Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docs/src/content/docs/zh-cn/reference/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,23 @@ declare namespace StarlightApp {
要更新嵌套的配置值,你必须提供整个嵌套对象。

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

```ts {6-11}
```ts {6-15}
// plugin.ts
export default {
name: 'add-twitter-plugin',
hooks: {
'config:setup'({ config, updateConfig }) {
updateConfig({
social: {
social: [
...config.social,
twitter: 'https://twitter.com/astrodotbuild',
},
{
icon: 'twitter',
label: 'Twitter',
href: 'https://twitter.com/astrodotbuild',
},
],
});
},
},
Expand Down
5 changes: 5 additions & 0 deletions docs/src/content/docs/zh-cn/resources/community-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ import { CardGrid, LinkCard } from '@astrojs/starlight/components';
title="一路开源"
description="Cloudflare 是如何使用 Starlight 来升级他们的开发者文档的。"
/>
<LinkCard
href="https://starlight-changelog.netlify.app/"
title="Starlight Changelog"
description="在一个精美的页面上查看 @astrojs/starlight 包的所有发布版本。"
/>
</CardGrid>

## 方案和指南
Expand Down
30 changes: 25 additions & 5 deletions docs/src/content/docs/zh-cn/resources/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ sidebar:
title="starlight-obsidian"
description="将 Obsidian vaults 发布到 Starlight 网站。"
/>
<LinkCard
href="https://astro-ghostcms.xyz/intro/starlight/install/"
title="starlight-ghostcms"
description="添加你的 GhostCMS 博客文章到你的 Starlight 文档。"
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-image-zoom"
title="starlight-image-zoom"
Expand Down Expand Up @@ -132,6 +127,31 @@ sidebar:
title="starlight-view-transitions"
description="添加浏览器原生的跨文档视图过渡动画。"
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-auto-sidebar"
title="starlight-auto-sidebar"
description="调整自动生成的侧边栏组。"
/>
<LinkCard
href="https://github.com/delucis/starlight-llms-txt"
title="starlight-llms-txt"
description="基于 llmstxt.org 将 llms.txt 添加到你的文档站点。"
/>
<LinkCard
href="https://github.com/trueberryless-org/starlight-toc-overview-customizer"
title="starlight-toc-overview-customizer"
description="调整 Starlight的 目录,可自定义概述标题。"
/>
<LinkCard
href="https://delucis.github.io/starlight-markdown-blocks/"
title="starlight-markdown-blocks"
description="扩展 Starlight 的 Markdown 旁白语法,增加自定义块类型。"
/>
<LinkCard
href="https://github.com/WindMillCode/starlight-fullview-mode"
title="starlight-fullview-mode"
description="收起侧边栏,展开内容以获得全屏体验。"
/>
</CardGrid>

## 社区工具和集成
Expand Down