chore: update readme

This commit is contained in:
NaitLee 2025-09-26 19:50:03 +08:00
parent 4ef48dc861
commit ea7e7558ca

View file

@ -2,21 +2,41 @@
## 基本流程
| | |
| -: | :- |
| 克隆: | `git clone --recursive https://git.amaharacya.one/amainait/amaharacya.one.git` |
| 構建: | `./mk.sh` (需要 `apt install php-cli php-mbstring php-xml` |
| 伺服: | `python3 -m http.server -d out` (正式部署請使用更好的靜態檔案伺服器) |
1. 克隆此倉庫
- `git clone --recursive https://git.amaharacya.one/amainait/amaharacya.one.git`
新頁面放在 `src/pages`
一些頁面的特殊邏輯在 `tpl/*.php`
2. 選擇 SSG 引擎
- [dummy-ssg](https://codeberg.org/haydenwu/dummy-ssg): 準備依賴: `apt install php-cli php-mbstring php-xml`
<!-- - omnisrv: 即將推出 -->
3. 構建靜態頁面
- `./mk.sh`
- 結果置於 `out` 目錄。
4. 伺服
- `python3 -m http.server -d out`
- 正式部署請使用更好的靜態檔案伺服器。
## 小技巧
推薦 1 級標題後緊跟 2 級標題(如果有內容的話)。
一級標題在 `/pages.html` 頁面自動列出。
新頁面放在 `src/pages`
Powered by [dummy-ssg](https://codeberg.org/haydenwu/dummy-ssg).
PHP 模板在 `tpl/*.php`
一級標題在 `/page` 頁面自動列出。
與 dummy-ssg 不同Markdown 文檔頭部使用簡易鍵值對,而非 JSON:
```
---
title Building Website
lang en-US
---
# About How to Build a Website
...
```
## 授權