Files
2026-12-02 15:45:58 +08:00

37 lines
963 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# about.sahik.dev
Sahik 的個人頁。純靜態:`public/` 裡的 HTML / CSS / JS,沒有建置步驟。
```
public/ 要部署的檔案(index.html、style.css、main.js、404.html、img/)
image/ 原始照片(不會被部署)
wrangler.jsonc Cloudflare Worker 設定
Dockerfile 備案:nginx 容器
```
## 部署(Cloudflare Worker)
```bash
npx wrangler login
npx wrangler deploy
```
`wrangler.jsonc` 已經把 `about.sahik.dev` 設成 custom domain,第一次部署會自動建 DNS 記錄(sahik.dev 要在同一個 Cloudflare 帳號)。
## 備案(Docker on TrueNAS)
```bash
docker build -t sahik-about .
docker run -d -p 8080:80 --name sahik-about sahik-about
```
再用 cloudflared 把 `about.sahik.dev` 指到 `http://<主機>:8080`。
## 本機預覽
直接開 `public/index.html`,或 `npx wrangler dev`。
## 換照片
原圖放 `image/`,轉成 WebP(長邊 1400、去 EXIF)放到 `public/img/`。