Skip to content

Commit 3760619

Browse files
committed
docs: rewrite documentation site README with Chinese content
1 parent 6aac247 commit 3760619

1 file changed

Lines changed: 51 additions & 21 deletions

File tree

docs/README.md

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,71 @@
1-
# Website
1+
# Candy Documentation
22

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
3+
基于 [Docusaurus 3](https://docusaurus.io/) 构建的 Candy 文档站点。
44

5-
### Installation
5+
## 开发
66

7-
```
8-
$ yarn
7+
```bash
8+
# 安装依赖
9+
pnpm install
10+
11+
# 启动开发服务器
12+
pnpm start
913
```
1014

11-
### Local Development
15+
开发服务器启动后自动打开浏览器窗口,支持热重载。
1216

13-
```
14-
$ yarn start
17+
## 构建
18+
19+
```bash
20+
pnpm build
1521
```
1622

17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
23+
生成静态文件至 `build` 目录,可部署至任意静态文件服务器。
1824

19-
### Build
25+
## 部署
2026

21-
```
22-
$ yarn build
27+
### GitHub Pages
28+
29+
```bash
30+
# 使用 SSH
31+
USE_SSH=true pnpm deploy
32+
33+
# 使用 HTTPS
34+
GIT_USER=<username> pnpm deploy
2335
```
2436

25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
37+
### 其他平台
2638

27-
### Deployment
39+
构建后将 `build` 目录部署至任意静态托管服务(Vercel、Netlify、Cloudflare Pages 等)。
2840

29-
Using SSH:
41+
## 目录结构
3042

3143
```
32-
$ USE_SSH=true yarn deploy
44+
docs/
45+
├── docs/ # 文档源文件
46+
│ ├── intro.md
47+
│ ├── quick-start.md
48+
│ ├── faq.md
49+
│ └── config/ # 配置相关文档
50+
├── blog/ # 博客文章
51+
├── src/ # 自定义组件与样式
52+
├── static/ # 静态资源
53+
└── docusaurus.config.ts
3354
```
3455

35-
Not using SSH:
56+
## 添加文档
3657

37-
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
39-
```
58+
1.`docs/` 目录创建 Markdown 文件
59+
2. 更新 `sidebars.ts` 添加侧边栏入口
60+
3. 使用相对路径引用图片等资源
61+
62+
## 配置
63+
64+
主配置文件 `docusaurus.config.ts` 包含:
65+
66+
- 站点元数据(标题、URL、描述)
67+
- 导航栏与页脚
68+
- 主题与样式
69+
- 插件配置
4070

41-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
71+
详细配置参考 [Docusaurus 官方文档](https://docusaurus.io/docs/configuration)

0 commit comments

Comments
 (0)