把《Codex:从聊天机器人到交付工具》从书稿升级而来的在线教程站点:14 章正文 + 4 篇附录,含 39 个编号案例、57 个动手实践、184 个代码/配置示例。
- 在线阅读:https://lucas8848168.github.io/codex-tutorial/
- 仓库:https://github.com/lucas8848168/codex-tutorial
部署方式:GitHub Pages,来源为
main分支根目录(legacy 构建)。推送main后 1~2 分钟自动更新;站点为纯静态文件,无服务端依赖。
codex-tutorial/
├── index.html # 首页:学习路径、章节卡片、案例索引、统计数据
├── ch01.html ~ ch14.html # 14 章正文
├── glossary.html # 附录:术语表
├── cheatsheet.html # 附录:速查表
├── faq.html # 附录:常见问题
├── roadmap.html # 附录:学习路径(14 天 / 30 天计划)
├── assets/
│ ├── style.css # 站点样式(极简两色:墨蓝 + 强调蓝)
│ ├── app.js # 导航、搜索、代码复制、学习进度、页内目录高亮
│ ├── search-index.js # 构建时生成的搜索索引(189 条)
│ ├── highlight.min.js # highlight.js 本地副本(离线可用)
│ └── hljs-theme.css
├── content/ # Markdown 源文件(改内容只改这里)
│ ├── ch01.md ~ ch14.md
│ └── glossary.md / cheatsheet.md / faq.md / roadmap.md
└── build.py # 构建脚本:Markdown → 静态站点
- 侧边栏导航:按「认知与原理 / 上手与选型 / 体系化 / 场景实战 / 团队与边界 / 附录」分组,当前页高亮
- 全文搜索:按
/聚焦,搜索章节、小节标题与简介(索引在构建时生成) - 页内目录:右侧目录随滚动高亮当前小节;窄屏自动隐藏
- 代码体验:语言标签、一键复制、本地 highlight.js 语法高亮(无外网也可用)
- 学习进度:每章可「标记为已学完」,进度存 localStorage,侧边栏底显示 已完成 x / 14 章
- 键盘操作:
/搜索、←→翻章、Esc退出搜索 - 响应式:≤900px 侧边栏收起为抽屉
/Users/phs/.workbuddy/binaries/python/envs/default/bin/python build.py
# 依赖:markdown、beautifulsoup4(已装在托管 venv 中)构建会重新生成全部 HTML 与 assets/search-index.js,并在 stdout 打印统计(小节数、案例数、代码块数、字数)。
cd /Users/phs/WorkBuddy/2026-09-17-18-05-00/codex-tutorial
python3 -m http.server 4173
# 浏览器打开 http://localhost:4173内容改动后按顺序执行三步,Pages 会自动重建:
python3 build.py # 1. 重新构建(注意用托管 venv 的 python)
git add -A && git commit -m "更新内容" # 2. 提交
git push # 3. 推送,1~2 分钟后线上生效