Termio
Blog

nextjs / 2026-05-10 / 6 min read

Building a fast, SEO-friendly site with Next.js static export

How Termio's public site uses Next.js static export, metadata routes, typed content arrays, and root-relative assets.

A marketing site does not need a server for every page view. If the content is hand-authored and changes through deploys, Next.js static export gives you React authoring, metadata routes, and fast static files that can sit behind a simple CDN or file server.

Use App Router pages as content modules

TSX pages work well for product content because code blocks, typed arrays, and reusable components live in the same language. A blog index can be driven from a typed post registry while each route remains statically generated.

export const metadata = {
  title: "Products",
  description: "Apps and tools from Termio.",
};

const products = [
  { name: "Termio", href: "/", tagline: "Your coding agent, from your pocket." },
];

Root-relative assets age better

If the site is served at the apex domain, asset paths should be root-relative: /icon.png, /screenshots/app.png, and /blog/. Old subpath prefixes tend to leak into Open Graph images, nav links, and generated HTML.

Generate sitemap and robots from code

Next metadata routes are a good fit for static export. A sitemap route can import the blog registry and list every page. A robots route can point crawlers at the canonical sitemap URL.

export default function sitemap() {
  return posts.map((post) => ({
    url: `https://example.com/blog/${post.slug}/`,
    lastModified: post.date,
  }));
}

Keep public content public

Static export makes source inspection easy. That is a feature, but it means content should be deliberately sanitized. Do not paste internal hostnames, private repository names, local file paths, or credentials into public technical writing. Teach the general lesson with generic examples.

Verify the exported files

A passing TypeScript build is not enough. Check that expectedindex.html files exist, grep for stale subpaths, and scan the export for private strings. Static sites are easy to verify because the artifact is just files.

The result is a site that is fast by default, easy to deploy, and friendly to search crawlers without adding a runtime service.