What is Static Generation (SSG)?

TL;DR

Pre-rendering strategy that generates HTML at build time for maximum performance and SEO benefits.

Static Generation (SSG) pre-renders pages at build time, generating HTML that can be cached and served instantly from CDN.


Static pages:

export default async function BlogPost({ params }) {
const post = await getPost(params.id);
return <Article post={post} />;
}

export async function generateStaticParams() {
const posts = await getAllPosts();
return posts.map(post => ({ id: post.id }));
}


Benefits:

  • Maximum performance - instant page loads
  • Perfect SEO - fully rendered HTML
  • Reduced server costs - serve from CDN
  • Enhanced security - no server runtime needed


AI-friendly: Static generation strategy is explicit through generateStaticParams, making build-time rendering obvious and predictable.

Last updated: November 25, 2025

Ready to Launch Your SaaS Faster?

Start from a stable architecture that makes AI more reliable, not confused — so you can go from idea to product in record time.

AI-friendly architecture
Production ready from day one
Lifetime updates