Skip to content

Static Export

Louis Wright edited this page Oct 14, 2026 · 1 revision

Static export

Status: planned / pre-release. This wiki page mirrors docs/ and documents the intended API of next-herald. Nothing is published yet; names may change before v1.0. See ROADMAP.

With output: 'export', metadata, sitemap.ts, robots.ts and opengraph-image work if they are fully static.

  • defineSitemap / defineRobots: supported. Dynamic patterns need params enumerators that run at build.
  • Sitemap index via route handlers (sitemapIndex, newsSitemap): route handlers in export must be static GETs with export const dynamic = 'force-static'; covered by an e2e fixture (v0.3, #28). If it cannot be made reliable, the docs will say so and herald build --emit-xml out/ is the fallback (written after next build, into the export output, not public/).
  • OG images: dynamic routes need generateStaticParams.
  • indexing: 'auto' is evaluated at build; set HERALD_ENV=production in the production build.
  • Check it: herald check --dir out (no server). Clean URLs depend on your host; pass --trailing-slash to match next.config.

Clone this wiki locally