Sitemap
Builds sitemap.xml files from Payload collections and static URLs, then stores them in any Payload storage adapter.
Installation
pnpm add @seshuk/payload-plugin-sitemap About
This plugin builds XML sitemaps from your Payload content and keeps them current. You list the sources in a `sources` array. A source can be a collection with a URL pattern such as `/blog/:slug`, a static list of pages, or a custom function that returns URLs. Output includes index and child sitemaps, split at the 50,000 URL or 50 MB limits, with image entries and hreflang alternates for locales. The plugin hooks into document changes. Creating, updating, or deleting a document in a listed collection queues a `sitemap-generate` Payload job. The job waits `jobs.regenerate.delay` (5 minutes by default) so that several edits share one run. It writes the XML, uploads only the files that changed to the files collection, and then switches the public endpoints to the new set in one write to a hidden `sitemap-status` global. If a run fails before that switch, the previous files stay online. Files are stored through whatever storage adapter the project already uses, including S3, R2, Bunny, Vercel Blob, local disk, or a custom upload function, and can be pushed to a CDN with the `publish` option. The sitemap only lists published documents, and it reads documents as an anonymous visitor, so the collection's `read` access decides what appears. Collections that rely on Payload's default access will list nothing until they allow public reads or the source sets `overrideAccess`. With the multi-tenant plugin, tenants are not split into separate sitemaps unless the `tenants` option is set. Generation needs a job runner, such as `jobs.autoRun`, a cron calling `payload jobs:run`, or a custom worker. The admin panel gets a Sitemap page and a dashboard widget with run status, a file table, and a Regenerate button. The plugin targets Payload 4 beta on Next.js or TanStack Start and requires Node.js 24.15 or later.
Package info
- Package name
@seshuk/payload-plugin-sitemap- Latest version
0.1.0- Unpacked size
- 660 kB
- License
- MIT
- Last publish
- Oct 14, 2026
More from maximseshuk
View profileJanitor
Finds orphaned uploads and unreferenced documents in Payload storage, then deletes only the entries you approve.
Shared plugin tooling
Dev-only shared config for lint, format, TypeScript, build, test database, and release workflows across the @seshuk Payload plugins.
OpenAPI
Generates OpenAPI specifications from Payload CMS configurations.
Bunny Storage Adapter
Bunny.net storage and stream adapter for Payload CMS with TUS resumable uploads and CDN cache purging.
Media Preview
Preview images, videos, audio, and documents directly in the Payload CMS admin panel.
Similar plugins
More in SEOSEO JSON-LD Structured Data
Builds Schema.org JSON-LD for products, breadcrumbs, carousels, site search and organization data in Payload e-commerce sites.
Product Reviews
Adds a moderated product reviews collection with star ratings and Schema.org aggregateRating data for Google rich results.
SEO Analyzer
Payload plugin that audits page SEO in the editor sidebar with 50+ checks, a dashboard, score history, redirects and IndexNow.
SEO plugin
A plugin to manage SEO metadata from within the Payload admin panel.
SEO Plugin
Adds SEO metadata fields with live search-result previews to Payload collections and globals.
Llms Txt
Generates llms.txt and llms-full.txt files for LLMs from your Payload collections.