Skip to content

如何贡献与本地预览 ​

环境 ​

  • Node.js 18+(推荐 22)
  • npm 9+

本地启动 ​

bash
cd agent-notes
npm install
npm run docs:dev

浏览器打开终端提示的本地地址(默认 http://localhost:5173/agent-notes/)。

常用命令 ​

命令作用
npm run docs:dev本地热更新预览
npm run docs:build构建静态站点到 docs/.vitepress/dist
npm run docs:preview预览构建产物

写文档约定 ​

  • 正文放在 docs/ 下,用 Markdown。
  • 侧边栏在 docs/.vitepress/config.ts 的 sidebar 里登记。
  • 架构图优先用 Mermaid 代码块(```mermaid)。
  • 文档标题用一级标题;首页用 VitePress layout: home。

GitHub Pages ​

推送到 main 后,Actions 工作流 Deploy VitePress site to Pages 会自动构建并发布。

仓库设置需确认:

  1. Settings → Pages → Build and deployment → Source = GitHub Actions
  2. 首次部署成功后访问:
    https://2356222374.github.io/agent-notes/

若仓库名不是 agent-notes,请同步修改 docs/.vitepress/config.ts 里的 base。

Released under the MIT License.