Marketing and documentation hosting
WiseWig has two static Astro sites deployed as Cloudflare Workers static assets:
| Workspace | Domain | Worker |
|---|---|---|
apps/marketing-site | wisewig.app | wisewig-marketing |
apps/docs-site | docs.wisewig.app | wisewig-docs |
Both use custom domains because each Worker is the origin for its hostname. Wrangler creates the required DNS records and certificates. The documentation app loads the repository’s root docs/*.md through Astro’s content loader, so hosted documentation and version-controlled documentation cannot drift.
Local development
pnpm --filter @wise-wig/marketing-site dev
pnpm --filter @wise-wig/docs-site dev
Astro defaults to port 4321; pass -- --port 4322 when running both concurrently.
Validation
pnpm --filter @wise-wig/marketing-site check
pnpm --filter @wise-wig/marketing-site build
pnpm --filter @wise-wig/docs-site check
pnpm --filter @wise-wig/docs-site build
Deployment
Use the authenticated Wrangler CLI from each workspace:
pnpm --filter @wise-wig/marketing-site run deploy
pnpm --filter @wise-wig/docs-site run deploy
The checked-in wrangler.jsonc files own the exact custom-domain attachment. Do not add a separate DNS record for either hostname unless intentionally replacing the Worker as origin.
Post-deployment verification
Verify the public resolver and the application path separately after creating a hostname:
dig +short @1.1.1.1 docs.wisewig.app A
curl --fail --show-error --head https://docs.wisewig.app/
curl --fail --show-error --head https://docs.wisewig.app/getting-started/
Cloudflare creates the DNS record and certificate for a Worker custom domain. A resolver or browser that queried the hostname before it existed may temporarily retain an NXDOMAIN response even after authoritative DNS is correct. Confirm with a public resolver, wait for the negative-cache TTL, and restart the affected browser or resolver before changing Worker or DNS configuration. Adding a competing CNAME prevents the custom-domain attachment from owning the hostname.