Deploy.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# wrangler.toml - Cloudflare Workers 静态站点配置 (Wrangler 4.x)
|
||||
name = "swstatic-site"
|
||||
compatibility_date = "2026-07-08"
|
||||
|
||||
# ✅ 核心配置 - 只使用 main 字段
|
||||
main = "./src/index.js"
|
||||
|
||||
# 📦 静态站点配置 - 关键:使用 assets 而不是 site
|
||||
[assets]
|
||||
# 指向 Hugo 生成的 public 目录
|
||||
directory = "../public"
|
||||
# 指定绑定名称
|
||||
binding = "ASSETS"
|
||||
|
||||
# 🏗️ 构建配置 - Hugo 生成静态文件
|
||||
[build]
|
||||
command = "hugo --minify --cleanDestinationDir"
|
||||
# 构建工作目录设置为项目根目录
|
||||
cwd = ".."
|
||||
|
||||
# 🌐 开发环境配置
|
||||
[dev]
|
||||
port = 8787
|
||||
ip = "localhost"
|
||||
local_protocol = "http"
|
||||
upstream_protocol = "https"
|
||||
|
||||
# 🚀 部署配置
|
||||
compatibility_flags = ["nodejs_compat"]
|
||||
Reference in New Issue
Block a user