← All plugin changes

sm-sitemap-plugin 0.2.0

v0.2.03 min readPlugins

Highlights

  • A sitemap index of per-type files. /sitemap.xml (same address) lists /sitemap-<type>-<n>.xml files built from every content type's published records and the additional addresses. Addresses keep their file between rebuilds; only a change of the file size renumbers.
  • Real lastmod. A record's lastmod moves only when a save changes something that matters (configurable ignore list), and rebuilds are debounced after record events and run nightly.
  • Image and News sitemaps, IndexNow and an HTML sitemap.

Added

  • hreflang alternates for records with more than one translated locale, with x-default.
  • Image sitemap files from each page's images, and a Google News sitemap (sitemap-news.xml) for articles published in the last 48 hours, limited to chosen types or categories.
  • IndexNow: a key, its key file and pings of added, changed and removed addresses in production, including a record deleted in the admin and a content edit that keeps its address.
  • An HTML sitemap API (groups, category trees, paging) for the site's sitemap page.
  • One settings screen (Settings › Sitemaps) with the files table, the addresses left out by reason, the content types (include, file name, headings) and the additional addresses; a management API and MCP tools.
  • A filter contract (contract.Filter) that lets another plugin leave addresses out (noindex, canonical elsewhere, redirect) and group them.
  • contract.Rebuilder, which lets another plugin ask for a debounced rebuild (the SEO plugin does when the frontend reports new noindex pages).

Changed

  • Breaking. The WinterCMS byte-format sitemap, priority tiers, the definitions screen, the old settings tile and /sitemap.xsl are removed. <priority> and <changefreq> are no longer written. The config keys golem15.sitemap.cache_seconds and golem15.sitemap.priority_tiers and the events BeforeAddItem and AddItem are gone.
  • Upgrade: run the migrations: the definition's url items move to the additional addresses (a relative path such as o-nas gets its leading slash, spaces are percent-encoded, a duplicate is copied once), frontend_url to the site address, frontend_default_locale to the default locale; the old table stays, unread. An item that cannot be an additional address (an absolute URL with &, another scheme, a malformed item) is not copied: the startup log names each one as golem15.sitemap: definition url item not copied with the item, its value and the reason, so check the log after the upgrade and add those addresses by hand if they are still wanted. Serve the root file names from /_sitemap/files/<name> (vue-seo-layer v0.2.0 does it; with nginx, a proxy rule) and remove any nginx /sitemap* location. Run sitemap:rebuild once after the release. Additional addresses that the site serves noindex are left out automatically once the frontend reports its noindex pages (sm-seo-plugin v0.2.0 with vue-seo-layer v0.2.0); otherwise remove them.
  • Requires SummerCMS v0.6.1.

Fixed

  • An additional address that a content record already lists is written once (it is counted as "Already listed by a content type" on the settings screen).
  • An HTML sitemap heading follows each language until an editor sets one; saving the settings no longer stores the type's name in the admin's language as every language's heading.
Subscribe via RSS