SSG generates HTML at build time. Pages are pre-rendered and served from CDN.
How it works:
Build process fetches data
HTML generated for each page
Static files deployed to CDN
Optional hydration for interactivity
Pros: Fastest load times, cheap hosting, excellent SEO, highly cacheable.
Cons: Stale content until rebuild, long build times for large sites.
Use when: Content rarely changes. Blogs, documentation, marketing pages.