Cloudflare
Deploy a Heyo Docs project to Cloudflare with the framework-specific setup generated by create-heyo-docs.
Loading documentation…
Choose Cloudflare when creating a Heyo Docs project to get the required
adapter, Worker configuration, and deploy script for the selected framework.
Documentation pages are prerendered where the framework supports it; Cloudflare
runs application routes only when the site needs them, such as Try it or AI
Chat.
Pass the deployment target to create-heyo-docs. Cloudflare is supported by
React Router, Astro, and Next.js:
Replace react-router with astro or next as needed. The generated project
uses the appropriate integration:
| Framework | Generated deployment integration |
|---|---|
| React Router | Cloudflare Worker and @cloudflare/vite-plugin |
| Astro | @astrojs/cloudflare |
| Next.js | OpenNext for Cloudflare |
Set siteUrl to the final public HTTPS address before the production build.
Heyo Docs uses it for canonical metadata, the sitemap, RSS, and AI-discovery
files. It can include the path where the documentation is mounted.
Keep this value pointed at the canonical production address. A preview URL is
useful for testing, but it should not replace the production siteUrl in the
committed configuration.
Log in to the Cloudflare account that owns the Worker, then run the generated
scripts. The deploy script is framework-specific, so use it instead of a
generic static-file upload.
For React Router, Wrangler deploys the Worker and the built client assets.
Astro writes the deployable Worker configuration during bun run build.
Next.js runs the OpenNext build as part of bun run deploy. Set a stable,
project-specific Worker name in wrangler.jsonc before the first shared
release.
A documentation-only site needs no runtime secrets. If AI Chat is enabled, store its provider key in Cloudflare instead of committing it to the project:
The generated Cloudflare integrations read that binding on the server. Configure
other application secrets with Cloudflare's secret management too; never put
them in wrangler.jsonc, MDX, or browser-side configuration.