Static Site Generation (SSG) pre-renders a website into static HTML at build time. While traditional SSG is limited by build scaling, modern frameworks introduce hybrid patterns like Incremental Static Regeneration (ISR) to handle massive content scale.
Traditional SSG (e.g., Hugo, Jekyll) renders every page on every build.
ISR (popularized by Next.js) allows you to create or update static pages after you’ve built your site. It combines the benefits of static sites with the flexibility of server-side rendering.
Modern architectures (like Astro or Next.js) allow mixing rendering modes per-route:
When using ISR for dynamic routes, use a fallback state (e.g., fallback: 'blocking' or a loading skeleton) to ensure that users requesting newly created content (not in the initial build) don't receive a 404.
Instead of waiting for a timer, use On-Demand Revalidation. Trigger a webhook from your CMS to purge the cache and re-generate a specific page the moment it is updated.
In hybrid SSG, use the Islands Architecture to keep the HTML static while only hydrating specific interactive widgets. This minimizes the "JavaScript tax" on initial load.