From 9fe605af3a5dc2b107d8953325bfec15ebbfa88d Mon Sep 17 00:00:00 2001 From: Ben Fellows Date: Wed, 5 Aug 2026 20:10:53 +1200 Subject: [PATCH] Add wrangler.jsonc so the docs site deploys as Workers static assets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cloudflare's dashboard build for docs.teemops.com now uses the unified Workers Builds system (`wrangler deploy` / `wrangler versions upload`), which reads its output directory from a wrangler config in the repo rather than a dashboard field. Without one, deploys failed with "Could not detect a directory containing static files" because there was nothing telling Wrangler that `mkdocs build`'s output lives in `site/`. Points assets.directory at `./site` and sets not_found_handling to "404-page" so mkdocs' generated 404.html is served instead of Cloudflare's blank default. No Worker script needed — this is a pure static-assets deploy, verified locally with `mkdocs build` + `wrangler deploy --dry-run`. Co-authored-by: Cursor --- wrangler.jsonc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 wrangler.jsonc diff --git a/wrangler.jsonc b/wrangler.jsonc new file mode 100644 index 0000000..f1844c0 --- /dev/null +++ b/wrangler.jsonc @@ -0,0 +1,16 @@ +{ + // Deploys the built docs.teemops.com site (see mkdocs.yml) as a Cloudflare + // Workers static-assets project — no Worker script needed, just the + // "site/" folder that `mkdocs build` produces. + // + // IMPORTANT: "name" must match the Worker/project name shown in the + // Cloudflare dashboard for this deployment. Update it if it differs. + "name": "tops-docs", + "compatibility_date": "2026-08-05", + "assets": { + "directory": "./site", + // mkdocs generates 404.html at the site root — serve it for unmatched + // paths instead of Cloudflare's blank default 404. + "not_found_handling": "404-page" + } +}