feat(17-03): full sitemap generation, settings, hooks and import commands

- generator in Definition::addItemToSet order: 50000 URL cap, lastmod from
  the record or the updates manifest (regular file, 5 MiB cap, fail safe),
  BeforeAddItem (skip) and AddItem (extra XML) festival events, tier or item
  priority, per-alternate expansion of list type children
- priority tiers from golem15.sitemap.priority_tiers, compiled at boot,
  defaults equal to the PHP getPriorityForUrl rules
- frontend_url rewrite of loc, xhtml:link href and the stylesheet href;
  GET /sitemap.xsl serves the PHP stylesheet byte for byte
- golem15_sitemap_settings singleton and Settings model
- sitemap:import (PHP ImportCommand) and sitemap:import-winter with the
  read-only Winter export SQL
- urlto and full goldens generated from PHP; TestSitemapImportSmoke
This commit is contained in:
2026-10-12 17:07:39 +02:00
parent fe39e26ce0
commit 4a82240429
24 changed files with 2970 additions and 54 deletions

View File

@@ -33,8 +33,8 @@
* A registry type's resolved item is given in the Go shape (one item per
* record with ordered alternates); this script turns it into what the PHP
* headless resolvers returned: a list type (no url) yields one entry per
* alternate for each child, any other type its children with their default
* URL.
* alternate for each child (a child without alternates once), any other type
* its children with their default URL.
*/
$vendor = getenv('WINTER_VENDOR');
@@ -194,7 +194,7 @@ class GoldenSitemap
$info['items'] = [];
foreach ($r['items'] as $child) {
$childInfo = $this->phpResolved($child, false);
if ($listChildren) {
if ($listChildren && $childInfo['alternateLinks']) {
foreach ($childInfo['alternateLinks'] as $locale => $href) {
$perLocale = $childInfo;
$perLocale['url'] = $href;