The Quartz docs have a section on Cloudflare Pages, but it’s outdated. Pages and Workers have merged in the Cloudflare dashboard, and the setup is different now. Here’s what actually works.
wrangler.toml
You need a wrangler.toml at your repo root. Without it, Cloudflare doesn’t know where your static assets live.
name = "your-site"
compatibility_date = "2026-03-16"
[assets]
directory = "public"The [assets] block is the key part — it tells Cloudflare to serve the public/ folder as static files. This replaces the old “Build output directory” field that Pages used to have in the dashboard.
Build settings
In your Cloudflare dashboard (Workers & Pages > your project > Settings > Builds):
- Build command:
git fetch --unshallow && npx quartz build - Deploy command:
npx wrangler deploy
The git fetch --unshallow is needed because Cloudflare does a shallow clone by default. Without it, git-based timestamps for your content won’t work.
That’s it
Push to your repo, Cloudflare picks up the commit, builds, and deploys. Custom domain setup is under your project’s Custom Domains tab.