Cloudflare
Updated May 16, 2026
Cloudflare Workers can serve a directory of static assets directly — no separate compute, no SPA shim. This is how livemark.dev ships, and the same wrangler.jsonc shape works for any Livemark site.
Build the site
livemark buildOutput lands in .livemark/build/client/.
Configure wrangler.jsonc
Drop this at your project root:
{
"name": "my-docs",
"compatibility_date": "2026-04-01",
"workers_dev": true,
"assets": {
"directory": ".livemark/build/client",
},
}Two fields do the heavy lifting:
| Field | Purpose |
|---|---|
assets.directory | Points Wrangler at the Livemark build output. Every file is served as-is. |
workers_dev | Gives you a <name>.<account>.workers.dev preview URL while testing. |
Deploy from your machine
livemark build
wrangler deployThe first run prompts for wrangler login to authorize against your Cloudflare account.
Deploy with GitHub Actions
name: deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 24
- run: pnpm install
- run: livemark build
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}Create a scoped API token at My Profile → API Tokens (the "Edit Cloudflare Workers" template grants exactly what you need) and store both values as repo secrets.
Custom domain
Add a routes block once your zone is on Cloudflare:
{
"name": "my-docs",
"compatibility_date": "2026-04-01",
"assets": { "directory": ".livemark/build/client" },
"routes": [{ "pattern": "docs.example.com", "custom_domain": true }],
}custom_domain: true tells Cloudflare to provision a managed domain — DNS, certificate, and route are all handled for you. Set site to the same domain in livemark.config.ts so absolute URLs in the sitemap and RSS feeds line up.
See also
- Site Metadata —
sitepowers absolute URLs and feed generation. - Deployment — back to the host index.
Created with ❤ and Livemark