Skip to content

Commit

Permalink
docs: update add site guide
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Apr 1, 2024
1 parent d8c46b0 commit e9007a7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
| `pnpm run preview` | 本地预览 |

## 添加 Showcase

用 Astro 或 Starlight 构建过中文网站?欢迎添加 Showcase!

1. Fork 此仓库,在你的[本地运行](#-commands)
Expand All @@ -25,20 +26,21 @@
- 你网站域名命名的 `.png` 格式,例如 `example.com.png`
- 图片尺寸为 800 × 450 像素。

3.`src/components/showcase-sites.astro` 为你的网站添加新的一条。
3.`src/sites.ts` 为你的网站添加新的一条。
- 新的网站必须放在已存在的列表最后。
- `title` 属性是必须的,它是你的网站的名称。
- `href` 属性是必须的,它是你的网站的 URL。
- `thumbnail` 属性是必须的,它是第 2 步中添加的截图文件名。

```diff
<Card title="Example" href="https://example.com" thumbnail="example.com.png" />
<Card title="Last Example" href="https://example.org" thumbnail="example.org.png" />
+ <Card title="你的网站" href="https://example.com" thumbnail="example.com.png" />
</FluidGrid>
const sites: Site[] = [
// ...
{ title: 'Example', href: 'https://example.com', thumbnail: 'example.com.png' },
{ title: 'Last Example', href: 'https://example.org', thumbnail: 'example.org.png' },
+ { title: '你的网站', href: 'https://example.com', thumbnail: 'example.com.png' },
]
```

4. 创建一个 PR 到本仓库。

[![Deployed on Zeabur](https://zeabur.com/deployed-on-zeabur-dark.svg)](https://zeabur.com?referralCode=liruifengv&utm_source=liruifengv&utm_campaign=oss)

0 comments on commit e9007a7

Please sign in to comment.