🔒 Frozen at Build Time
Built at: 2026-03-10T09:59:23.577Z

↑ This timestamp never changes on refresh. That's SSG.

🎤 Interview Answer"SSG pre-renders pages at build time. The HTML is static and served from a CDN, making it the fastest possible delivery. I'd use it for blogs, documentation, and marketing pages where content doesn't change per-user or per-request."

Blog Posts (Static Data)

Fetched at build time — could be from a CMS, MDX files, or database.

Understanding React Server Components
2024-01-15
5 min
Next.js App Router Deep Dive
2024-01-22
8 min
TypeScript Patterns for Scale
2024-02-03
6 min

App Router Pattern

// app/blog/page.tsx — SSG (default behavior)

// Optional: explicit revalidation = false means pure static
export const revalidate = false;

export default async function BlogPage() {
  // fetch() with no options → cached at build time
  const posts = await fetch("https://api.example.com/posts");
  const data = await posts.json();

  return <PostList posts={data} />;
}
// For dynamic SSG routes: generateStaticParams()
export async function generateStaticParams() {
  const posts = await getPosts();
  return posts.map((p) => ({ slug: p.slug }));
}  // replaces getStaticPaths from Pages Router

Pages Router Equivalent

export async function getStaticProps() {
  const data = await fetchPosts();
  return { props: { data } };
}

// For dynamic routes:
export async function getStaticPaths() {
  return { paths: [...], fallback: false };
}
Pros: Blazing fast, CDN-friendly, no server needed · Cons: Stale until next build, not for user-specific data