Notes on Deploying Static Sites with Cloudflare Workers Assets
A quick reference on using wrangler.jsonc static assets with a custom domain registered on Cloudflare.
Because shanimcode.fyi is registered with Cloudflare Registrar, DNS, TLS, and edge serving all live in the same place.
Why static assets + wrangler.jsonc
For an article-first site, shipping pre-rendered HTML means zero cold starts and instant edge caching. With wrangler.jsonc pointing assets.directory at ./dist:
{
"name": "shanimcode-fyi",
"assets": {
"directory": "./dist",
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page"
}
}
A single npm run deploy builds the site and pushes it straight to the edge.