Static Site Generation for 1,200+ Pages: Lessons from Building a Baby Name Database

When I started building BabyNamePick, I knew I wanted every single name to have its own page. With 1,200+ names, that meant 1,200+ statically generated pages — plus category pages, letter pages, an...

By · · 1 min read
Static Site Generation for 1,200+ Pages: Lessons from Building a Baby Name Database

Source: DEV Community

When I started building BabyNamePick, I knew I wanted every single name to have its own page. With 1,200+ names, that meant 1,200+ statically generated pages — plus category pages, letter pages, and blog posts. Here's what I learned about scaling static generation. The Numbers Our current build generates: 1,269 name pages (/name/[slug]) 50+ category pages (/[category]) 26 letter pages (/letter/[letter]) 85+ blog posts (/blog/[slug]) Total: ~3,400+ static HTML pages All from a single names.json file and a TypeScript blog module. Lesson 1: Keep Your Data Source Simple We tried a few approaches: SQLite → too much overhead for static generation Markdown files → too many files to manage JSON file → ✅ simple, fast, version-controlled // data/names.json - 1,269 entries [ { "name": "Elara", "meaning": "Shining light", "gender": "girl", "origin": "greek", "style": ["celestial", "mythological"], "popularity": "rising", "startLetter": "E" } ] A single JSON file loads in milliseconds, filters in m