Skip to content

Commit 371a701

Browse files
committed
提交初版文档
1 parent 2f96359 commit 371a701

79 files changed

Lines changed: 29629 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: npm
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build site
35+
run: npm run build
36+
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: build
41+
42+
deploy:
43+
needs: build
44+
runs-on: ubuntu-latest
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
doc.zlua.cn

README.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
1-
# zlua-doc
2-
Document for ZLua.
1+
# ZLua Docs
2+
3+
[ZLua Docs](https://doc.zlua.cn)[ZLua](https://github.com/focus-creative-games/zlua) 的官方文档站点源码,基于 [Docusaurus](https://docusaurus.io/) 构建。
4+
5+
## 本地开发
6+
7+
```bash
8+
npm install
9+
npm start
10+
```
11+
12+
浏览器访问 [http://localhost:3000](http://localhost:3000)
13+
14+
## 构建
15+
16+
```bash
17+
npm run build
18+
npm run serve
19+
```
20+
21+
## 部署(GitHub Pages)
22+
23+
推送到 `main` 分支后,[`.github/workflows/deploy.yml`](./.github/workflows/deploy.yml) 会自动构建并部署到 **https://doc.zlua.cn**。
24+
25+
### 首次启用
26+
27+
1. 仓库 **Settings → Pages → Build and deployment → Source** 选择 **GitHub Actions**
28+
2. DNS 为 `doc.zlua.cn` 配置 CNAME 指向 `<org>.github.io`(或按 GitHub Pages 自定义域名说明配置)
29+
3. 仓库 Settings → Pages 中填写 Custom domain:`doc.zlua.cn` 并启用 HTTPS
30+
31+
`static/CNAME` 会在构建时写入站点根目录,供 GitHub Pages 识别自定义域名。
32+
33+
## 文档结构
34+
35+
- `docs/getting-started/` — 入门
36+
- `docs/guides/` — 使用指南
37+
- `docs/concepts/` — 核心概念
38+
- `docs/reference/` — API 参考
39+
- `docs/spec/` — 规范文档(权威语义)
40+
- `docs/architecture/` — 架构与性能
41+
- `docs/community/` — 社区与贡献
42+
43+
## 许可证
44+
45+
MIT

docs/architecture/_category_.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "架构与性能",
3+
"position": 1
4+
}

0 commit comments

Comments
 (0)