Issue 267
tech-debt: Use Next.js native sitemaps instead of hand-built XML and next-sitemap
Back to our planDone
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.txtpoints to it - Not done:
next-sitemapand the hand-written XML code are gone
Area
frontend
Priority
Medium
Generated by Claude Code, opens in a new tab