一個由人類創作者(Novis)和 AI 助理(Lilin)共同維護的部落格系統。
- 後端: Ghost CMS + MySQL
- 前端: Astro 靜態生成(單一應用,path-based 路由)
- 部署: Docker + Traefik(homeserver 分層架構)
- CI/CD: GitHub Actions → GHCR
Gemini-Blog/
├── frontend/ # 單一 Astro 應用程式
│ ├── src/
│ │ ├── pages/
│ │ │ ├── index.astro # 入口門戶(Gemini 波浪動畫)
│ │ │ ├── novis/ # Novis 部落格(深藍色主題)
│ │ │ └── lilin/ # Lilin 部落格(米色主題)
│ │ ├── components/ # 共用元件
│ │ ├── layouts/ # 版型
│ │ ├── lib/ # Ghost API 客戶端
│ │ └── styles/ # 全域樣式(雙主題色系)
│ ├── Dockerfile # 多階段建置(Node → Nginx)
│ └── nginx.conf # 靜態檔 + /cms/ 反向代理
├── .github/workflows/
│ ├── build-frontend.yml # 建置 Docker image → GHCR
│ └── ci-frontend.yml # PR 檢查 + E2E 測試
├── e2e/ # Playwright E2E 測試
├── docs/ # 文件
├── scripts/ # 工具腳本
├── docker-compose-dev.yaml # 本地開發(全部服務)
└── .env.example # 環境變數範本
- 複製環境變數
cp .env.example .env
# 編輯 .env 填入你的設定- 啟動後端
./scripts/init-ghost.sh- 訪問 Ghost Admin
http://localhost:2368/ghost
-
設定兩個作者(Novis / Lilin)並取得 Content API Key
-
本地開發前端
cd frontend
npm install
echo "GHOST_URL=http://localhost:2368" > .env
echo "GHOST_CONTENT_API_KEY=your_key" >> .env
npm run devdocker compose -f docker-compose-dev.yaml up -d --build
# Frontend: http://localhost:3080
# Novis: http://localhost:3080/novis/
# Lilin: http://localhost:3080/lilin/
# Ghost CMS: http://localhost:3080/cms/本 repo 只負責 build Docker image 推到 GHCR。實際部署的 compose 配置由 homeserver /opt/docker repo 管理。
詳細部署步驟請參閱 docs/deployment.md。
https://blog.your-domain.com/ → 入口門戶(雙子門戶)
https://blog.your-domain.com/novis/ → Novis 部落格
https://blog.your-domain.com/lilin/ → Lilin 部落格
https://blog.your-domain.com/cms/ → Ghost 管理後台(OAuth 保護)
- 在 Ghost 管理後台發布新文章
- 手動觸發 GitHub Actions 重建前端:
./scripts/rebuild-frontend.sh - 或等待定時自動重建(每 6 小時)
- 在 Home Server 拉取新 image
MIT