TigerSEO: sitemap.xml + robots.txt (routes) + a public-URL registry#11
Merged
Conversation
"Map every public (guest) URL and tell Google." Implements the discovery layer: - Tiger_Sitemap (core registry, like Tiger_Dashboard): any module declares its public URLs from its Bootstrap via register($key, fn($ctx): array). Core owns it so declaring public URLs never depends on the SEO module. collect() runs every provider, de-dupes by loc, fail-soft on a throwing provider. - Seo_SitemapController / Seo_RobotsController — public (guest ACL), raw XML / text, layout+view disabled. /sitemap.xml lists the homepage + every provider's URLs (absolutized, org-scoped, with <lastmod>); /robots.txt disallows the non-public app paths (tiger.seo.robots.disallow, per-org config) and points at the sitemap. - Both are ROUTES via Tiger_Routing_Overrides (Seo_Bootstrap), never docroot files — a physical sitemap.xml would shadow the route under cPanel's real-file-first .htaccess. Dotted paths survive the matcher; a real controller always wins. - Providers: seo registers 'pages' (CMS, /slug); blog registers 'blog' (articles, /blog/slug — the blog owns its URL form, the resolver never learns "blog"). A future TigerDocs/marketplace registers its own the same way. Smoke now asserts /sitemap.xml lists the seeded page and /robots.txt points at it. Per-request build for v1; a fingerprint cache is the scale follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Implements "map every public (guest) URL and tell Google" — the discovery layer beneath sitelinks/rich-results.
Tiger_Sitemap— a core public-URL registryAny module declares the URLs it owns from its Bootstrap:
Tiger_Sitemap::register($key, fn($ctx): array). Core owns the registry (likeTiger_Dashboard), so declaring public URLs never depends on the SEO module — a search index or link checker could read it too.collect()runs every provider, de-dupes byloc, and drops a throwing provider (fail-soft). Each provider is org/locale-scoped via$ctx.Routes, never files
/sitemap.xml+/robots.txtare served by publicSeo_SitemapController/Seo_RobotsController(guest ACL, raw XML/text, layout+view off), wired throughTiger_Routing_OverridesinSeo_Bootstrap. A physicalsitemap.xmlin the docroot would silently shadow the route under cPanel's real-file-first.htaccess, so we never write one. Dotted paths survive the matcher; a real controller always wins (verified).<lastmod>fromupdated_at).tiger.seo.robots.disallow, per-org config; sane defaults) and points crawlers at the sitemap.Providers (modules describe themselves)
seoregisterspages(published CMS pages →/slug).blogregistersblog(published articles →/blog/slug— the blog owns its URL form; the SEO layer never learns content types).Verified
Smoke now asserts
/sitemap.xmlreturns 200 + lists the seeded page (thepagesprovider), and/robots.txtreturns 200 + carries aSitemap:line — CI coverage that the routes dispatch and the registry collects. Lint clean.Per-request build for v1; a fingerprint cache (TigerDocs pattern) is the scale follow-up. Next: wire TigerDocs' public docs into the registry, then the JSON-LD schema PR (Organization/WebSite/BreadcrumbList/SiteNavigationElement).
🤖 Generated with Claude Code