Skip to content

fix(web): keep marketing routes static on Cloudflare Workers - #145

Merged
kkopanidis merged 1 commit into
mainfrom
fix/ssg-layout-fetch-cache
Aug 21, 2026
Merged

fix(web): keep marketing routes static on Cloudflare Workers#145
kkopanidis merged 1 commit into
mainfrom
fix/ssg-layout-fetch-cache

Conversation

@kkopanidis

Copy link
Copy Markdown
Contributor

Summary

  • Cache the GitHub star count at build time (cache: "force-cache") instead of hourly ISR (revalidate: 3600)
  • Pin the root layout to dynamic = "force-static" so a layout fetch cannot opt the whole site into SSR

The Workers deploy uses a read-only static-assets incremental cache. ISR revalidation cannot write to it, so /docs, /modules, /hosting, /contribute, and /roadmap 500 while / still serves from Static Assets.

Test plan

  • npx tsc --noEmit in apps/web
  • npm run build/, /docs, /modules, /hosting, /contribute, /roadmap prerender as static (○/●); only /api/search is ƒ
  • After merge, redeploy conduit-web and confirm those URLs return 200 (client nav from the homepage, not only a full reload)

The GitHub star fetch used ISR revalidation, which cannot write to the
read-only static-assets cache and 500s every non-home route.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
conduit-web b344ce9 Commit Preview URL

Branch Preview URL
Aug 21 2026, 09:27 AM

@kkopanidis
kkopanidis merged commit 54b940d into main Aug 21, 2026
3 checks passed
@kkopanidis
kkopanidis deleted the fix/ssg-layout-fetch-cache branch August 21, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant