|
| 1 | +#:schema node_modules/wrangler/config-schema.json |
| 2 | + |
| 3 | +# Cloudflare Worker config for the Starlight docs build. |
| 4 | +# |
| 5 | +# Deployment model: Workers Static Assets (no Worker script needed). |
| 6 | +# Wrangler uploads `./dist` and serves it directly. Because every page |
| 7 | +# the build produces lives under `/docs/...` (the splash at /docs/, all |
| 8 | +# versioned content at /docs/v1/, /docs/v2/, /docs/v3/), this Worker |
| 9 | +# slots cleanly into a `/docs/*` route on a parent zone. |
| 10 | +# |
| 11 | +# Build first: pnpm --filter starlight build |
| 12 | +# Deploy: npx wrangler deploy |
| 13 | +# Local preview: npx wrangler dev |
| 14 | +# |
| 15 | +# To mount on the /docs/* subpath of an existing zone, uncomment the |
| 16 | +# [[routes]] block below and replace the pattern + zone_name with your |
| 17 | +# domain. Without routes, the Worker is reachable at its |
| 18 | +# *.workers.dev URL. |
| 19 | + |
| 20 | +name = "inertiacore-docs" |
| 21 | +compatibility_date = "2026-04-13" |
| 22 | + |
| 23 | +# Workers Static Assets — points at the Astro build output. |
| 24 | +# `not_found_handling = "404-page"` makes Cloudflare serve dist/404.html |
| 25 | +# for unmatched paths, which Starlight already generates. |
| 26 | +[assets] |
| 27 | +directory = "./dist" |
| 28 | +not_found_handling = "404-page" |
| 29 | + |
| 30 | +# Route binding lives in CI, not here. |
| 31 | +# |
| 32 | +# Wrangler does not interpolate environment variables inside |
| 33 | +# `[[routes]]` blocks, so this file ships without one. The deploy |
| 34 | +# workflow appends a `[[routes]]` block from the `CF_ROUTE_PATTERN` and |
| 35 | +# `CF_ZONE_NAME` GitHub Actions repository variables before running |
| 36 | +# `wrangler deploy` — see .github/workflows/deploy-starlight.yml. |
| 37 | +# |
| 38 | +# Without a route, `wrangler deploy` puts this Worker on its |
| 39 | +# *.workers.dev URL, which is fine for local smoke-testing via |
| 40 | +# `npx wrangler deploy` or `npx wrangler dev`. |
| 41 | + |
| 42 | +# Optional: separate dev/staging environment with its own subdomain. |
| 43 | +# |
| 44 | +# [env.staging] |
| 45 | +# name = "inertiacore-docs-staging" |
| 46 | +# [env.staging.assets] |
| 47 | +# directory = "./dist" |
| 48 | +# not_found_handling = "404-page" |
0 commit comments