Engineering

What is SSG (Static Site Generation)?

SSG generates HTML once at build time and serves it static from the CDN — maximum speed and zero runtime cost for pages that don't change per user.

Ideal for blogs, docs, marketing pages, landing pages. Content changes at build (regenerated all); between builds, it's just CDN delivering static files.

Limit: anything needing dynamic per-request data (login, dashboard) doesn't fit pure SSG — goes to SSR or ISR. Mature teams mix SSG (public) + SSR (private) in the same app.

Frequently asked questions

Does SSG scale to 10,000 pages?
Yes, but the build gets long. Solutions: ISR (generates on demand) or incremental build (only changed pages).
Does SSG work with DB data?
Yes, at build time. But for frequently changing data, ISR is better: generates static and regenerates periodically.