[3.x] Support pages with more output file extensions (Convert sitemap to a Hyde page)#2529
Merged
emmadesilva merged 7 commits intoJul 13, 2026
Merged
Conversation
The sitemap is now a route: registered as an in-memory page behind Features::hasSitemap(), compiled through the standard build, and skipped when a user-defined page already claims the sitemap.xml route key. The contents resolve the SitemapGenerator from the service container at compile time so the implementation can be swapped with a container rebind. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Removes the GenerateSitemap post-build task now that the sitemap page is compiled through the standard build, and rewires the build:sitemap command to build the registered page (or a new instance when the route is not registered, preserving the ability to explicitly generate the sitemap when it is disabled in the configuration) through the StaticPageBuilder. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Covers the feature-gated route registration, compilation through the build command including build manifest and route list presence, the container rebind customization tier, user-defined pages suppressing the generated page through both booting callbacks and extensions, and the realtime compiler serving sitemap.xml with the XML content type. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
These tests assert the exact contents of a default project's page and route collections, which now include the sitemap page since the monorepo test environment configures a site URL. The sitemap route registration itself is covered by SitemapPageTest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3/non-html-pages #2529 +/- ##
=====================================================
Coverage 100.00% 100.00%
- Complexity 1738 1742 +4
=====================================================
Files 175 175
Lines 4340 4349 +9
=====================================================
+ Hits 4340 4349 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed:
Epic decisions resolved and written back: D4's deferred plain-page-vs-subclass call went to the thin subclass — the command's fallback instantiation is exactly the concrete need the epic anticipated, mirroring BuildSearchCommand/DocumentationSearchIndex. Also recorded: the D2 allowlist confirmation for sitemap.xml, the D5 ordering semantics, and part B notes (mirror with RssFeedPage; the BuildTaskServiceUnitTest fixtures were migrated to GenerateBuildManifest so removing the RSS task won't churn them again).
Verification: New SitemapPageTest (11 tests) covers registration gating, build-manifest and route:list presence, self-exclusion, rebind, and both override paths; a realtime-compiler test confirms hyde serve returns the sitemap with application/xml. Full regression protocol ran clean: Unit and Feature suite FAILED lists are identical to the pre-change baseline (the ~40/51 remaining failures are the documented environmental PHP 8.5 asset/FeaturedImage set), FeatureHyde and Realtime Compiler suites fully pass, and HydeStan found no errors. One real fallout the suite caught: the monorepo's .env sets a site URL, so tests asserting exact default collections (PageCollectionTest, RouteCollectionTest, RouteListCommandTest) now saw the sitemap route — they disable the sitemap in setUp() to stay focused on collection mechanics. Release notes and an UPGRADE.md step (with the rebind/override migration paths) are included.