Skip to content
Search

Sitemap.js

lastmod 2025-12-08created 2025-12-081 edits

Streaming-based, high-performance sitemap generation library and CLI

About

  • Streaming-based sitemap generation tool built to automate URL management for large websites
  • Provided as a Node.js library and CLI for easily generating, updating, and validating sitemap XML files
  • Supports processing large numbers of URLs through stream APIs such as SitemapStream and SitemapAndIndexStream
  • Can generate a sitemap from a URL list in a single run, or integrate with an Express server to serve it in real time
  • Automatically splits files and generates index files when handling more than 50,000 URLs
    • simpleSitemapAndIndex() manages multiple sitemap files and the index automatically
    • Each file supports gzip compression and XSL stylesheet integration
  • Detailed metadata can be set per entry, such as changefreq, priority, image, video, news, and hreflang links
  • Supports customizing XML namespaces and specifying an XSL stylesheet URL
  • Supports XMLToSitemapItemStream for reading an existing sitemap to filter, modify, and regenerate it
    • A Transform stream can be used to process only specific URL patterns
  • Supports both ESM and CommonJS, with a Promise-based asynchronous stream processing design
  • Fully compatible with the Node.js stream ecosystem; well suited to large-scale web crawling and SEO automation workflows
  • MIT license

See also

Favorite site

author Zer0 sitemap