finds.dev

IlusionDev/nextjs-sitemap-generator

Generate sitemap.xml from nextjs pages

View on GitHub

★ 520TypeScriptMITupdated Mar 2023

// the take

A Node.js utility that walks a Next.js pages directory and writes a sitemap.xml, meant to be invoked once from a custom Next.js server at startup (or as a standalone script for static exports). It's for teams running pre-App-Router, pages-directory Next.js sites who don't want to hand-write sitemap XML themselves. As of this writing it is officially deprecated by its own author in favor of next-sitemap.

Handles the annoying edge cases of static Next sitemaps: exportPathMap/getStaticPaths-generated dynamic routes via a BUILD_ID lookup, i18n alternate-language <xhtml:link> entries, per-route priority/changefreq overrides via pagesConfig (with regex support), and custom XSL/CSS stylesheets. Ships TypeScript types (lib/*.d.ts) so config objects get autocomplete rather than relying on JSDoc comments. The config surface is a single function call with no build-step integration required, which kept adoption trivial for pages-router projects.

The README itself says the project is deprecated, unmaintained, and actively points users to next-sitemap instead - that's not a maintenance risk, it's a maintenance certainty. It only works via a custom server (next start with a custom server.js), which the README itself flags as unsupported on Vercel, the platform most Next.js apps actually deploy to; static export users have to remember to rerun the script manually after every build. There's zero App Router support - this is pages-directory only, so it's dead weight on any Next.js 13+ project using app/. The documented ignoredPaths bug (substring matching instead of exact path matching) was never fixed before the project was abandoned, so excluding one route can silently exclude unrelated ones that share a substring.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

search the same ground:

// at a glance

Stars
520
Forks
36
Language
TypeScript
License
MIT
Last commit
4 Mar 2023

// nearby

If nextjs-sitemap-generator isn't quite it.

All repos →