Next.js static export

Next.js with output export produces a folder of static files, which makes it a reasonable choice for React teams building marketing sites, blogs and documentation. It also inherits constraints the server-rendered version does not have: no image optimization service, no request-time rendering, no rewrites, and a React runtime shipped to every page whether it needs one or not.

The guides below cover working well inside those constraints — routes, URLs, MDX, feeds and images — and, for sites where the constraints cost too much, the measured case for moving to Astro, including a full migration from the Pages Router.

Next.js features in static export mode A matrix. Static pages and generateStaticParams work. MDX and metadata routes such as sitemap.ts work. The image optimization service does not work without a loader. Rewrites, middleware and ISR do not work. The React runtime ships to every page. What static export keeps and loses Feature In static export Guide approach Static pages, params works generateStaticParams Sitemaps, feeds, MDX works metadata routes Image optimization needs a loader build-time or CDN Rewrites, middleware, ISR not available host rules or rebuilds
The red rows are why several guides below exist.

Choosing the Right Static Site Generator for Production

Number of Next.js guides of each kind Vertical bars: How-tos 7, Fixes 1, Comparisons 3 and Concepts 2. Next.js guides by kind 7 How-tos 1 Fixes 3 Comparisons 2 Concepts
13 guides use Next.js in depth; each is listed below under the section it belongs to.

Production-Ready Deployment & CI/CD for SSGs

  • Vercel ISR vs Static Generation for SSGsComparisonISR rebuilds pages on demand; static generation builds everything upfront. Astro, Eleventy, Hugo, and Jekyll have no ISR — they rebuild and purge at the CDN.
Topics with the most Next.js guides Horizontal bars, largest first: Next.js Static Export for Content Sites 10, Migrating Between Static Site Generators 1, SSG Framework Selection Matrix 1 and Netlify vs Vercel Deployment Strategies 1. Where Next.js comes up Next.js Static Export for Content Sites 10 Migrating Between Static Site Generators 1 SSG Framework Selection Matrix 1 Netlify vs Vercel Deployment Strategies 1
Topic pages give the wider context for each group; the numbers count only guides that use this tool in depth.

Often used with Next.js

  • Astro4 shared guidesIslands, content collections, astro:assets and deployment.
  • Gatsby2 shared guidesMaintaining and migrating existing Gatsby sites.
  • Eleventy2 shared guidesIncremental builds, image pipelines and the data cascade.
  • Hugo2 shared guidesBuild time at scale, image caches, modules and multilingual sites.
  • AWS (S3 and CloudFront)1 shared guidesS3 and CloudFront: clean URLs, cache policies and deploys.
  • Starlight1 shared guidesAstro-based docs: overrides, translation and migration in.