Skip to content
SprecherEast
Issue 267

tech-debt: Use Next.js native sitemaps instead of hand-built XML and next-sitemap

Back to our plan
Done
frontendtech-debtpriority: medium

Problem

Sitemaps are built by hand: src/platform/seo/sitemapResponse.ts writes the XML, three route handlers under src/app/(frontend)/(sitemaps)/ wrap it, and next-sitemap (config plus a postbuild step) runs but adds nothing, since its config excludes every page and robots.ts never links its output.

Proposed fix

Use Next's native sitemap.ts (MetadataRoute.Sitemap, split with generateSitemaps if needed) (docs, opens in a new tab). Delete the XML builder, the custom routes, next-sitemap.config.cjs, the postbuild step and the next-sitemap dependency. Update robots.ts to the new URLs.

Findings (#262): native fits fully; no plugin or custom code needed.

Acceptance criteria

  • Not done: /sitemap.xml (or its index) lists pages, posts and events as today
  • Not done: robots.txt points to it
  • Not done: next-sitemap and the hand-written XML code are gone

Area

frontend

Priority

Medium


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab