如何写文档
你后续写文档,按这个最小流程就行。
1. 新建页面
例如你要写“部署检查清单”,直接新建:
txt
docs/guide/deploy-checklist.md文件内容示例:
md
# 部署检查清单
## 发布前
- [ ] 本地构建通过
- [ ] CI Secrets 已配置
## 发布后
- [ ] 首页可访问
- [ ] 404 页面正常2. 把页面加到导航
到 docs/.vitepress/config.mts 的中文 sidebar 里新增链接:
ts
{ text: "部署检查清单", link: "/guide/deploy-checklist" }3. 本地预览
bash
pnpm run docs:dev访问:
http://localhost:5173/http://localhost:5173/guide/deploy-checklist
4. 发布上线
bash
git add .
git commit -m "docs: 新增部署检查清单"
git push origin main推送后会触发 GitHub Actions 自动部署。