bigins/scriptor-sitemap is a new standalone plugin that answers
/sitemap.xml with a sitemaps.org
<urlset> listing every public URL on the site, each with a
<lastmod>. Install it and the route starts working: no template
edits, no build step, no database table. This site already runs it
for /sitemap.xml.
What changed
- Two URL sources, merged. Every active CMS page (full
parent-chain path; the empty-slug home becomes
/) plus, if scriptor-markdown-pages ≥ 0.1.9 is installed, every markdown URL. The dependency is soft: without it the sitemap is simply pages-only. - Theme-agnostic activation. The plugin subscribes to
RouteNotFound, the last-chance event before Scriptor's 404, and emits the XML when the request path matches. Nothing to wire into a theme's_ext.php; it works the moment composer discovers it. - Configurable exclusions under
plugins.sitemap: drop CMS pages byexclude_templates,exclude_pagetypes,exclude_ids, orexclude_slugs, and drop both CMS and markdown URLs byexclude_paths(segment-aware prefix). Pluspath,base_url, andenabled. All keys optional. - Enabler in scriptor-markdown-pages 0.1.9. A new
UrlEnumeratorlists every routable markdown URL with its file mtime, so the sitemap composes markdown content without re-deriving the URL mapping.
Install
Not on Packagist, so register the VCS repo, then require:
composer config repositories.scriptor-sitemap \
vcs https://github.com/bigin/scriptor-sitemap
composer require bigins/scriptor-sitemap:^0.1
In Docker, bake it in with the two build args (typically alongside
markdown-pages so its URLs are included). The plugin is
auto-discovered; there is nothing to register and no theme line to
add. Point crawlers at it from robots.txt with a Sitemap: line.