Cloudflare Pages caps a deployment at ~20,000 files. As of 2026-06-27 we deploy 18,326 files, so headroom is limited and grows with every new content item. Tracking the analysis and levers here for when we need them.
Done so far
Rough breakdown of the ~18.3k
- ~1,670 HTML pages (one per post/tag/quiz/comparison/game/etc.,
trailingSlash: false)
- ~518
.md copies (AI-readable post/advent routes)
- ~1,231 images (1,082 png + 132 svg)
- ~15k
_next/ JS/CSS chunks — the bulk, currently unconfirmed
Confirm the _next bulk
Run on a built out/:
find out -type f | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20
Levers, ranked
- Threshold tag pages. 669 tags exist; 433 have only a single post. Generate only tags with ≥2 posts (~-433 pages). Filter centrally in
lib/tags.ts so the [tag] generateStaticParams and the tag chips use the same filtered set (no broken links).
- Offload images to Cloudflare R2 (~-1,231). Biggest single win; R2 is on Cloudflare so no egress, edge-cached. Rewrite image URLs + drop
public/images.
- Reconsider the
.md copies (~-518) if the AI-readable routes aren't pulling weight.
- Investigate the
_next/ chunk count once the diagnostic above is run (likely per-route chunks from the 45 interactive game/simulator components).
Cloudflare Pages caps a deployment at ~20,000 files. As of 2026-06-27 we deploy 18,326 files, so headroom is limited and grows with every new content item. Tracking the analysis and levers here for when we need them.
Done so far
lib/image-utils.ts).Rough breakdown of the ~18.3k
trailingSlash: false).mdcopies (AI-readable post/advent routes)_next/JS/CSS chunks — the bulk, currently unconfirmedConfirm the
_nextbulkRun on a built
out/:Levers, ranked
lib/tags.tsso the[tag]generateStaticParamsand the tag chips use the same filtered set (no broken links).public/images..mdcopies (~-518) if the AI-readable routes aren't pulling weight._next/chunk count once the diagnostic above is run (likely per-route chunks from the 45 interactive game/simulator components).