The-DevOps-Daily / The-DevOps-Daily/devops-daily
Cloudflare Pages file-count headroom (approaching the ~20k limit)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 392
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 121
Description
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
- #1421 pruned ~934 intermediate OG-source SVGs (deploy 19,260 → 18,326) and made web image resolution prefer PNG (
lib/image-utils.ts). - Paused the daily auto-content generation to stop the count creeping up (the weekly digest is kept).
Rough breakdown of the ~18.3k
- ~1,670 HTML pages (one per post/tag/quiz/comparison/game/etc.,
trailingSlash: false) - ~518
.mdcopies (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.tsso the[tag]generateStaticParamsand 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
.mdcopies (~-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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by building out/ and running the listed find command to confirm how much of the deployment is in _next/ chunks. Then read lib/tags.ts and the [tag] generateStaticParams and tag-chip usage to assess the threshold-page option. The issue needs an agreed lever and acceptance criteria before completion can be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cloud, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100