Skip to content

Commit 62cdd86

Browse files
committed
docs: 更新文档结构和内容,添加新功能说明(新增区分开发版和稳定版)
1 parent 8b4b7c2 commit 62cdd86

27 files changed

+1634
-39
lines changed

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ Yuxi-Know 是一个基于知识图谱和向量数据库的智能知识库系统
2828

2929
- 如果需要新建说明文档(仅开发者可见,非必要不创建),则保存在 `docs/vibe` 文件夹下面
3030
- 测试脚本可以放在 test 文件夹下面,可以从 docker 中启动测试(不要使用本地 Python 环境)
31-
- 代码更新后要检查文档部分是否有需要更新的地方,文档的目录定义在 `docs/.vitepress/config.mts`
31+
- 代码更新后要检查文档部分是否有需要更新的地方,文档的目录定义在 `docs/.vitepress/config.mts`。文档应该更新最新版(`docs/latest`

docs/.vitepress/config.mts

Lines changed: 66 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import markdownItTaskCheckbox from 'markdown-it-task-checkbox'
55
// https://vitepress.dev/reference/site-config
66
export default defineConfig({
77
lang: 'zh-CN',
8-
title: "Yuxi-Know Docs",
9-
description: "文档中心",
8+
title: "Yuxi-Know",
9+
description: "语析",
1010
base: '/Yuxi-Know/',
1111
markdown: {
1212
config: (md) => {
@@ -17,40 +17,76 @@ export default defineConfig({
1717
// https://vitepress.dev/reference/default-theme-config
1818
logo: "/favicon.svg",
1919
nav: [
20-
{ text: '快速开始', link: '/intro/quick-start' },
21-
],
22-
23-
sidebar: [
24-
{
25-
text: '简介',
26-
items: [
27-
{ text: '什么是 Yuxi-Know?', link: '/intro/project-overview' },
28-
{ text: '快速开始', link: '/intro/quick-start' },
29-
{ text: '模型配置', link: '/intro/model-config' },
30-
{ text: '知识库与知识图谱', link: '/intro/knowledge-base' }
31-
]
32-
},
3320
{
34-
text: '高级配置',
21+
text: 'Version',
3522
items: [
36-
{ text: '配置系统详解', link: '/advanced/configuration' },
37-
{ text: '文档解析', link: '/advanced/document-processing' },
38-
{ text: '智能体', link: '/advanced/agents-config' },
39-
{ text: '品牌自定义', link: '/advanced/branding' },
40-
{ text: '其他配置', link: '/advanced/misc' }
41-
]
42-
},
43-
{
44-
text: '更新日志',
45-
items: [
46-
{ text: '版本说明 v0.3', link: '/changelog/0.3-release-notes' },
47-
{ text: '路线图', link: '/changelog/roadmap' },
48-
{ text: '参与贡献', link: '/changelog/contributing' },
49-
{ text: '常见问题', link: '/changelog/faq' }
23+
{ text: 'Latest (开发版)', link: '/latest/intro/quick-start' },
24+
{ text: 'v0.3.0 (稳定版)', link: '/v0.3.0/intro/quick-start' }
5025
]
5126
}
5227
],
5328

29+
sidebar: {
30+
'/latest/': [
31+
{
32+
text: '简介',
33+
items: [
34+
{ text: '什么是 Yuxi-Know?', link: '/latest/intro/project-overview' },
35+
{ text: '快速开始', link: '/latest/intro/quick-start' },
36+
{ text: '模型配置', link: '/latest/intro/model-config' },
37+
{ text: '知识库与知识图谱', link: '/latest/intro/knowledge-base' }
38+
]
39+
},
40+
{
41+
text: '高级配置',
42+
items: [
43+
{ text: '配置系统详解', link: '/latest/advanced/configuration' },
44+
{ text: '文档解析', link: '/latest/advanced/document-processing' },
45+
{ text: '智能体', link: '/latest/advanced/agents-config' },
46+
{ text: '品牌自定义', link: '/latest/advanced/branding' },
47+
{ text: '其他配置', link: '/latest/advanced/misc' }
48+
]
49+
},
50+
{
51+
text: '更新日志',
52+
items: [
53+
{ text: '路线图', link: '/latest/changelog/roadmap' },
54+
{ text: '参与贡献', link: '/latest/changelog/contributing' },
55+
{ text: '常见问题', link: '/latest/changelog/faq' }
56+
]
57+
}
58+
],
59+
'/v0.3.0/': [
60+
{
61+
text: '简介',
62+
items: [
63+
{ text: '什么是 Yuxi-Know?', link: '/v0.3.0/intro/project-overview' },
64+
{ text: '快速开始', link: '/v0.3.0/intro/quick-start' },
65+
{ text: '模型配置', link: '/v0.3.0/intro/model-config' },
66+
{ text: '知识库与知识图谱', link: '/v0.3.0/intro/knowledge-base' }
67+
]
68+
},
69+
{
70+
text: '高级配置',
71+
items: [
72+
{ text: '配置系统详解', link: '/v0.3.0/advanced/configuration' },
73+
{ text: '文档解析', link: '/v0.3.0/advanced/document-processing' },
74+
{ text: '智能体', link: '/v0.3.0/advanced/agents-config' },
75+
{ text: '品牌自定义', link: '/v0.3.0/advanced/branding' },
76+
{ text: '其他配置', link: '/v0.3.0/advanced/misc' }
77+
]
78+
},
79+
{
80+
text: '更新日志',
81+
items: [
82+
{ text: '版本说明 v0.3', link: '/v0.3.0/changelog/0.3-release-notes' },
83+
{ text: '参与贡献', link: '/v0.3.0/changelog/contributing' },
84+
{ text: '常见问题', link: '/v0.3.0/changelog/faq' }
85+
]
86+
}
87+
]
88+
},
89+
5490
socialLinks: [
5591
{ icon: 'github', link: 'https://github.com/xerrors/Yuxi-Know' }
5692
],

docs/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ hero:
1111
alt: VitePress
1212
actions:
1313
- theme: brand
14-
text: 快速开始
15-
link: /intro/quick-start
14+
text: Latest 文档
15+
link: /latest/intro/quick-start
1616
- theme: alt
17-
text: 在线演示
18-
link: https://www.bilibili.com/video/BV1ETedzREgY/
17+
text: v0.3.0 文档
18+
link: /v0.3.0/intro/quick-start
1919

2020
features:
2121
- title: 🤖 智能体与模型
@@ -32,12 +32,12 @@ features:
3232
details: 完整的测试套件、API 文档、监控日志,适合企业级部署和使用
3333
---
3434

35-
36-
37-
## 轻松部署
35+
## 快速开始
3836

3937
```sh
4038
docker compose up --build -d
4139
```
4240

43-
查看端口与服务说明:高级配置 → 其他配置 → 服务端口。
41+
## 在线演示
42+
43+
观看视频演示:[Bilibili](https://www.bilibili.com/video/BV1DF14BTETq)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# 参与贡献
2+
3+
感谢所有贡献者的支持!
4+
5+
<a href="https://github.com/xerrors/Yuxi-Know/contributors">
6+
<img src="https://contributors.nn.ci/api?repo=xerrors/Yuxi-Know" alt="贡献者名单">
7+
</a>
8+
9+
## 如何贡献
10+
11+
### 1. Fork 项目
12+
13+
在 GitHub 上 Fork 本项目到你的账户。
14+
15+
### 2. 创建分支
16+
17+
```bash
18+
git checkout -b feature/amazing-feature
19+
```
20+
21+
### 3. 提交更改
22+
23+
```bash
24+
git commit -m 'feat: Add some amazing feature'
25+
```
26+
27+
### 4. 推送分支
28+
29+
```bash
30+
git push origin feature/amazing-feature
31+
```
32+
33+
### 5. 创建 PR
34+
35+
在 GitHub 上创建 Pull Request,详细描述你的更改内容。
36+
37+
## 开发指南
38+
39+
### 代码规范
40+
41+
- 遵循项目代码规范
42+
- Python 代码使用 `make format` 格式化
43+
- 使用 `make lint` 检查代码质量
44+
- 添加必要的测试用例
45+
- 更新相关文档
46+
47+
### 提交规范
48+
49+
使用清晰的提交信息:
50+
51+
```
52+
feat: 添加新功能
53+
fix: 修复 bug
54+
docs: 更新文档
55+
style: 代码格式调整
56+
refactor: 代码重构
57+
test: 添加测试
58+
chore: 构建过程或辅助工具的变动
59+
```
60+
61+
62+
## 🐞 Bug 修复发布流程
63+
64+
如果在发布 `v0.3.0` 后发现 bug:
65+
66+
### ✅ 情况 1:main 上没有未完成的新功能
67+
68+
直接在 main 修复并发布:
69+
70+
```bash
71+
git commit -m "fix: resolve config parser crash"
72+
git tag -a v0.3.1 -m "Hotfix v0.3.1"
73+
git push origin main --tags
74+
```
75+
76+
### ⚙️ 情况 2:main 上已有新功能未完成
77+
78+
从上一个 tag 建立 hotfix 分支:
79+
80+
```bash
81+
git checkout -b hotfix/0.3.1 v0.3.0
82+
# 修复问题
83+
git commit -m "fix: resolve config parser crash"
84+
git push origin hotfix/0.3.1
85+
86+
# 测试后合并回 main 并打 tag
87+
git checkout main
88+
git merge --no-ff hotfix/0.3.1
89+
git tag -a v0.3.1 -m "Hotfix v0.3.1"
90+
git push origin main --tags
91+
92+
# 删除临时分支
93+
git branch -d hotfix/0.3.1
94+
git push origin --delete hotfix/0.3.1
95+
```
96+
97+
98+
### 测试要求
99+
100+
::: tip 测试
101+
- `make lint` / `make format` 保持代码整洁
102+
- `cp test/.env.test.example test/.env.test` 配置测试凭据
103+
- `make router-tests` 运行集成路由测试,支持 `PYTEST_ARGS="-k chat_router"`
104+
- `uv run --group test pytest test/api` 可直接运行 pytest(容器内)
105+
:::
106+
107+
<details>
108+
<summary>常用命令</summary>
109+
110+
```bash
111+
# 全量路由测试
112+
make router-tests
113+
114+
# 仅运行知识库相关用例
115+
make router-tests PYTEST_ARGS="-k knowledge_router"
116+
117+
# 不经过 Makefile,直接调用 pytest
118+
uv run --group test pytest test/api -vv
119+
```
120+
121+
</details>
122+
123+
## 许可证
124+
125+
本项目基于 MIT License 开源,贡献的代码将遵循相同的许可证。

docs/latest/changelog/faq.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# 常见问题
2+
3+
以下为最常见的安装与使用问题,更多细节请参阅相应章节链接。
4+
5+
- 首次运行如何创建管理员?
6+
- Web 首次启动会引导初始化;也可调用 API:
7+
- `GET /api/auth/check-first-run``first_run=true`
8+
- `POST /api/auth/initialize` 提交 `user_id``password`
9+
- 无默认账号,初始化后使用创建的超级管理员登录
10+
11+
- 镜像拉取/构建失败?
12+
- 可使用 `docker/pull_image.sh` 辅助拉取,或配置代理环境变量 `HTTP_PROXY/HTTPS_PROXY`
13+
- 若已配置代理仍失败,可临时取消代理后重试
14+
- 参考:介绍 → 快速开始 → 故障排除
15+
16+
- 服务端口与访问地址?
17+
- Web: `http://localhost:5173`;API 文档: `http://localhost:5050/docs`
18+
- 端口一览与说明见:高级配置 → 其他配置 → 服务端口
19+
20+
- Milvus/Neo4j 启动或连接失败?
21+
- 重启:`docker compose up milvus -d && docker restart api-dev`
22+
- Neo4j 默认:用户名 `neo4j`、密码 `0123456789`、管理界面 `http://localhost:7474`
23+
24+
- OCR 模型或服务不可用?
25+
- RapidOCR 本地模型:确保 `MODEL_DIR/SWHL/RapidOCR` 下存在 `PP-OCRv4` 模型
26+
- MinerU/PaddleX:检查健康检查接口与 GPU/CUDA 版本
27+
- 参考:高级配置 → 文档解析
28+
29+
- 支持的文件类型与常见入库失败?
30+
- 查询:`GET /api/knowledge/files/supported-types`
31+
- 常见失败:不支持的扩展名、内容哈希重复(去重)、OCR 服务未就绪
32+
33+
- 批量上传与转换示例?
34+
- 上传入库:`uv run scripts/batch_upload.py upload --db-id <id> --directory <dir> --username <u> --password <p> --base-url http://127.0.0.1:5050/api`
35+
- 参考:高级配置 → 文档解析
36+
37+
- 登录失败被锁定?
38+
- 多次失败会临时锁定账户,请根据提示等待后重试
39+
40+
- 如何查看日志和状态?
41+
- `docker ps` 查看整体;`docker logs api-dev -f``docker logs web-dev -f` 查看服务日志

0 commit comments

Comments
 (0)