refactor: move XML/RSS/sitemap routes to Trog::Routes::XML - #334
Draft
troglodyne-bot wants to merge 1 commit into
Draft
refactor: move XML/RSS/sitemap routes to Trog::Routes::XML#334troglodyne-bot wants to merge 1 commit into
troglodyne-bot wants to merge 1 commit into
Conversation
Extracts sitemap, rss_style, _rss, and _post2rss from the 1667-line HTML routes module into a dedicated Trog::Routes::XML module. Also fixes Trog::Routes::TXT which had the wrong package declaration and was never wired into TCMS.pm. Closes Troglodyne-Internet-Widgets#293. Fixes Troglodyne-Internet-Widgets#321 (sitemap index now counts only public posts, preventing empty sitemap pages for private/unlisted content). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Move sitemap, RSS, and XSL stylesheet routes out of the 1667-line
Trog::Routes::HTMLmodule into a newTrog::Routes::XMLmodule. Also fixTrog::Routes::TXTwhich had the wrong package declaration (Trog::Routes::JSON) and was never wired intoTCMS.pm.Why
Closes #293 — HTML.pm was acting as a catch-all for all content types. At 1667 lines, it was overdue for decomposition. XML/RSS routes are semantically distinct from HTML page routes.
Also fixes #321 — the sitemap index was calling
$data->count()which counted all posts including private/unlisted ones, potentially generating empty sitemap pages. Now counts only public posts via$data->get(limit => 0, acls => ['public']).How
Trog::Routes::XMLmodule owns:sitemap,_rss,_post2rss,rss_style+ their route entriesTrog::Routes::HTML::posts()callsTrog::Routes::XML::_rss()for RSS format requestsTCMS.pmnow imports and merges%Trog::Routes::TXT::routesand%Trog::Routes::XML::routesTrog::Routes::XML::sitemap()references%Trog::Routes::HTML::routesdirectly for static route scanning (same package, no circular dep)Testing
Trog-SQLite.tdbh mock failure, tracked in Add tests for core modules #332)🤖 Generated with Claude Code