跳至主要内容

把 blog 發到 Cloudflare Pages 的固定設定

· 閱讀時間約 1 分鐘
Ray(沈睿晉)
大學生、屏東里港救護義消(EMT),也寫 Python / Node.js 做實用工具

這個 blog 是標準靜態站,所以放到 Cloudflare Pages 的設定很固定。

Build 設定

  • Build command: npm run build
  • Build output directory: dist
  • Node.js version: 20

網域設定

部署完成後,把 blog.cracks666666.com 加到 Pages 專案的自訂網域設定。

如果 cracks666666.com 已經在同一個 Cloudflare 帳號裡,通常可以直接由 Cloudflare 幫你建立 DNS 記錄。

為什麼這種配置適合 blog

  • 不需要資料庫
  • 沒有 server-side runtime 成本
  • Git commit 就是內容版本歷史
  • Pages 負責自動建置與快取

這種組合很適合技術文章、專案紀錄、長期筆記站。