gitlink-cli/skills/gitlink-faq/references/gitlink-faq-publish.md

60 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# gitlink-faq Wiki 发布
> 本文档说明如何将生成的 FAQ 内容发布到 GitLink 项目 Wiki。
## 发布命令
### 首次创建知识库页面
```bash
gitlink-cli wiki +create \
--title "Issue-知识库" \
--file ./issue-faq.md \
--message "自动生成:从项目 Issue 提取 FAQ 知识库"
```
### 更新已有知识库页面
```bash
# 预览变更
gitlink-cli wiki +update --title "Issue-知识库" --file ./issue-faq.md --dry-run
# 覆盖更新
gitlink-cli wiki +update --title "Issue-知识库" --file ./issue-faq.md
```
### 检查知识库是否存在
```bash
# 列出所有 Wiki 页面
gitlink-cli wiki +list --format json
# 查看知识库内容
gitlink-cli wiki +view --title "Issue-知识库" --format json
```
## 发布检查清单
发布前确认以下内容,然后**直接发布,不需询问用户**
- [ ] FAQ 内容已展示给用户并获得确认
- [ ] `--dry-run` 已通过
- [ ] Markdown 格式正确(代码块、链接)
- [ ] 每条 FAQ 有来源 Issue 链接
- [ ] 答案质量标注正确high/medium/low → 待确认)
- [ ] 不存在敏感信息Token、密码等
## Wiki API 注意事项
- Wiki 使用独立的 **Gateway API**`https://gateway.gitlink.org.cn/api`),不走主 API
- 内容自动 base64 编码CLI 已处理
- `project_id` 会自动解析并缓存
- 如果更新失败(页面不存在),改用 `wiki +create`
## 发布后
发布完成后告知用户:
- Wiki 页面链接
- FAQ 条目数量统计
- 建议的刷新频率(每 1-2 周)