ZLua Docs 是 ZLua 的官方文档站点源码,基于 Docusaurus 构建。
npm install
npm start浏览器访问 http://localhost:3000。
npm run build
npm run serveprebuild 会运行 inject-guide-nav,为指南页注入上一篇/下一篇导航。
| 层级 | 路径 | 说明 |
|---|---|---|
| 规范(唯一语义标准) | docs/spec/ |
Lua 可见行为以本目录为准 |
| 实现对照 | docs/impl/ |
Mono / Il2Cpp 实现说明,不覆盖 spec |
| 选型对比 | docs/compare/ |
非行为契约 |
| 用户指南 / API | docs/guides/、docs/reference/ 等 |
不得与 docs/spec 冲突 |
冲突裁决:docs/spec → Il2Cpp 源码 → docs/impl。
推送到 main 分支后,.github/workflows/deploy.yml 会自动构建并部署到 **https://doc.zlua.cn**。
- 仓库 Settings → Pages → Build and deployment → Source 选择 GitHub Actions
- DNS 为
doc.zlua.cn配置 CNAME 指向<org>.github.io(或按 GitHub Pages 自定义域名说明配置) - 仓库 Settings → Pages 中填写 Custom domain:
doc.zlua.cn并启用 HTTPS
static/CNAME 会在构建时写入站点根目录,供 GitHub Pages 识别自定义域名。
docs/getting-started/— 入门docs/guides/— 使用指南docs/concepts/— 核心概念与术语docs/compare/— 选型对比(xLua / toLua / SLua)docs/reference/— API 参考docs/spec/— 规范文档(权威语义)docs/impl/— 架构与实现对照(架构侧栏)docs/community/— 社区、迁移、贡献与测试
MIT