
Generating 3,000+ Static Pages with Next.js: Lessons from a Baby Name Site
BabyNamePick generates over 3,000 static pages at build time. Here's what that looks like in practice and what we learned. The Page Breakdown 2,000+ individual name pages ( /name/[slug] ) 46 cultural origin pages ( /[category] ) 26 letter index pages ( /letter/[letter] ) 130+ blog posts ( /blog/[slug] ) Homepage, about, privacy, etc. Total: ~3,400 pages, all pre-rendered as static HTML. The Build Process Next.js generateStaticParams does the heavy lifting: // For name pages export function generateStaticParams () { return namePool . map ( name => ({ slug : name . name . toLowerCase (). replace ( / \s +/g , ' - ' ) })); } Each page gets its own metadata, structured data (JSON-LD), and internal links — all computed at build time. Build Time Reality With 3,400 pages, builds take 3-5 minutes on Vercel. That's acceptable for a site that deploys a few times per week. The tradeoff is worth it: Zero runtime compute Sub-50ms TTFB globally $0 hosting cost 100% uptime Lessons Learned 1. Structure
Continue reading on Dev.to JavaScript
Opens in a new tab



