feat(17-03): sitemap plugin tracer, /sitemap.xml byte-identical to PHP
- golem15.sitemap plugin: golem15_sitemap_definitions migration, Definition model (Fillable theme and data) with tolerant PHP-shaped item decoding and PHP toArray item encoding - Url::to and buildUrl port, libxml-format serializer, generator for url and registry items - GET /sitemap.xml serves the definition with theme default (404 without one, empty body without items) - tests/php/gen-goldens.php and the tracer golden; TestSitemapGolden and the Postgres TestSitemapTracer
This commit is contained in:
18
classes/testdata/tracer.json
vendored
Normal file
18
classes/testdata/tracer.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"case": {
|
||||
"root": "https://api.example.test",
|
||||
"items": [
|
||||
{"type": "url", "url": "/", "changefreq": "always", "priority": "1.0", "nesting": "0"},
|
||||
{"type": "acme-post", "reference": "7", "urlPattern": "", "changefreq": "weekly", "priority": "0.5", "nesting": "1"}
|
||||
],
|
||||
"types": {
|
||||
"acme-post": {
|
||||
"7": {
|
||||
"url": "/news/hello",
|
||||
"mtime": "2026-03-04T10:00:00+00:00",
|
||||
"alternates": [["pl", "/news/hello"], ["en", "/en/news/hello"]]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user