Reviving Praderas (Day 16) — language-split sitemaps
After the planned UI queue through EN search and non-post footers (Day 15), the next prioritized item in .agents/multilingual-ui-backlog.md was language-aware robots/sitemap behavior. This note records the design rationale and what landed in the repo.
Why a single flat sitemap.xml was not enough
The site already ships ES/EN pairs with hreflang and distinct URLs (/blog/... vs /blog/en/..., plus /en/... hubs). One combined sitemap is still valid, but we wanted:
- Operational parity: crawlers and operators should see URL sets split by language, matching how Twig and plugins already scope behavior via
content_lang. - Standard index pattern: a sitemap index at
/sitemap.xmlpointing to two child sitemaps avoids mixing languages in one flat<urlset>while staying within the sitemaps protocol. - Single source of truth for language: filtering reuses
Multilingual::inferLang(pathsblog/en/,en/, optionalLang) so SEO plumbing does not fork the heuristic used elsewhere.
robots.txt can keep a single Sitemap: line targeting the index; child sitemaps do not need separate directives unless you prefer them for tooling.
What shipped
-
plugins/PicoRobots/PicoRobots.php- Additional request URLs:
sitemap-es.xmlandsitemap-en.xml, alongsidesitemap.xmlandrobots.txt. - Per-language sitemap builds when those endpoints are requested; existing
lastmod/changefreq/priorityhandling and theonSitemaphook apply to each built list. /sitemap.xmlnow renders a<sitemapindex>linking…/sitemap-es.xmland…/sitemap-en.xml.
- Additional request URLs:
-
themes/bootstrap-blog/sitemap-index.twigandsitemap.twig- Theme-level templates for the index and URL sets (same shape as upstream defaults), resolved ahead of the plugin fallback.
Recommended production checks
After deploy, verify:
GET /sitemap.xmlreturns an index with two<loc>entries.GET /sitemap-es.xml/GET /sitemap-en.xmllist only URLs whose inferred language matches.GET /robots.txtstill references/sitemap.xml.
Backlog status
The Robots / sitemap per language row in .agents/multilingual-ui-backlog.md is now shipped; remaining pending lines are optional taxonomy policy and other non-blocking follow-ups.
Wall clock (implementation + agent docs)
- Start (reference):
2026-05-10 10:15:00 CEST - End (reference):
2026-05-10 10:45:00 CEST
Indicative window: ~30 minutes for branch work, plugin/theme changes, ledger updates, and this article (commit/push may follow immediately after).
As with earlier logs, treat this as an order-of-magnitude slice rather than a substitute for production measurement.