Releases: pecotamic/sitemap
Releases · pecotamic/sitemap
Release list
2.0.0
Breaking changes
- Dropped support for Statamic 3 and 4. The addon now requires Statamic 5 or 6 and PHP 8.2+.
SitemapEntryAPI changed:priorityis now afloat(was a string),lastmodis now nullable, and the constructor signature was updated accordingly. Custom templates oraddEntries()callers reading these properties may need adjustment.- Default cache lifetime (
expire) raised from 60 seconds to 1 day. Content changes now invalidate the cache immediately via events (see below), so a long lifetime is safe and reduces regeneration.
Features
- Event-based cache invalidation: the sitemap cache is now flushed automatically whenever an entry or term is saved or deleted, so changes appear immediately regardless of
expire.
Improvements
- Performance: entries are now filtered by collection and status at the query level instead of loading every entry and filtering in PHP.
- Cleaner XML output: the priority default (1.0 for the root path, 0.8 otherwise) is computed in PHP, removing stray whitespace from the
<priority>element.
Fixes
- Fixed a crash when an entry had no
lastmod(last modification) date. - Fixed type inconsistencies (
isAbsoluteUrlnow returns a real bool;priorityis normalized to a float). Generatoris no longer needlessly extendingFacade.
Internal
- Added a test suite (unit + feature coverage) and a GitHub Actions matrix testing PHP 8.2/8.3/8.4 against Statamic 5 and 6.
- Extracted the shared site-prefix logic into the service provider.
1.4.10
1.4.9
1.4.8
Allow invokable class as filter - thanks to Frederik Sauer for submission.
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
Improvement: filter entries by locale and exclude redirects