- 新增 Windows 11 RAGFlow + MCP 完整部署记录 - 添加 AI 栏目首页与免费模型 API 文档 - 更新 VuePress 配置与 collections 结构 - 添加缓存清理和文档同步脚本
32 lines
2.1 KiB
Plaintext
32 lines
2.1 KiB
Plaintext
---
|
||
description: 每次站点相关修改后须本地构建/启动并验证;Git 仅在被用户明确要求时提交
|
||
alwaysApply: true
|
||
---
|
||
|
||
# Agent 工作流:验证站点与 Git 提交
|
||
|
||
## 修改后必须自行验证(硬性要求)
|
||
|
||
凡改动 **VuePress / Plume 配置、`docs/` 下内容与主题相关代码** 等会影响站点展示或 dev/build 的行为时,**在本轮任务结束前必须**完成下列至少一项,并确认 **首页等主要页面非白屏**、**无控制台致命报错**(开发模式下可 F12 查看):
|
||
|
||
1. **推荐(与线上最接近)**:在项目根执行
|
||
`npm run docs:build`
|
||
然后执行
|
||
`npm run docs:verify`
|
||
(会检查 `docs/.vuepress/dist/index.html` 是否包含首页 hero 结构。)
|
||
|
||
2. **若重点验证热更新 / 开发体验**:执行
|
||
`npm run docs:dev-clean`
|
||
(`--clean-cache --clean-temp` 可避免 **Vite 预构建缓存** 仍指向旧版 `@vuepress/helper`,从而触发 **`encodeSVG` 导出缺失、整站白屏**。)
|
||
在浏览器打开本地地址,确认首页 hero 与导航正常。
|
||
|
||
**白屏常见原因速记**:`@vuepress/plugin-markdown-chart` 等依赖需要 `@vuepress/helper/client` 导出 `encodeSVG`;若 `docs/.vuepress/.cache` 里预打包了过旧的 helper,会出现 **仅 dev 白屏、build 正常**。处理:执行 **`npm run docs:clear-cache`** 后重启 dev,或 **`npm run docs:dev-clean`** / **`npm run docs:build`**(后两者会 clean)。项目已在 `config.ts` 的 Vite `optimizeDeps.include` 中强制包含 `@vuepress/helper/client`,以降低复发概率。
|
||
|
||
## Git 提交策略
|
||
|
||
- **禁止自作主张提交**:**仅当用户在本轮对话中明确说出要提交**(例如「提交一下」「帮我 commit」「推到 git」等)时,才执行 `git add` / `git commit` / `git push`。
|
||
- **未要求提交时**:改完代码、做完验证即可结束;**不要**替用户 commit。
|
||
- **用户若说不要提交**:同样不执行任何 git 写入操作。
|
||
|
||
**注意**:构建产物目录 **`docs/.vuepress/dist`**、缓存 **`.cache` / `.temp`** 已在 `.gitignore` 中,**不要**将编译输出提交进源码仓。
|