feat(seo): emit sitemap.xml + robots.txt at site root#28
Open
mastermanas805 wants to merge 1 commit into
Open
Conversation
Adds a post-prerender step that writes dist/sitemap.xml and dist/robots.txt so Google, Bing, and generative-engine crawlers (Perplexity, ChatGPT search) can discover every public URL — all 116 HTML routes plus their 116 .md mirrors, 232 total. Per-route <changefreq> policy: daily for /blog and /use-cases index pages, weekly for blog/use-case detail pages, monthly for the marketing copy (/pricing, /docs, /for-agents), weekly for everything else. Auth-gated routes (/app/*, /login, /claim) are excluded from the sitemap and Disallow'd in robots.txt; the two lists are derived from a single AUTH_GATED_PREFIXES constant so they cannot drift. robots.txt points at https://instanode.dev/sitemap.xml so crawlers find it without guessing. Verified: npm run build emits both files, xmllint validates sitemap.xml as well-formed XML, the URL count matches the prerender route count + .md mirror count. Co-Authored-By: Claude Opus 4.7 (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.
Summary
scripts/prerender.mjsemitsdist/sitemap.xmlanddist/robots.txtat the site root so Google, Bing, and generative-engine crawlers (Perplexity, ChatGPT search) can discover every public URL on instanode.dev./pricing,/docs,/for-agents,/status,/blog+ 5 posts,/use-cases+ 104 case detail pages) plus their 116.mdmirror counterparts. Each<url>has<loc>(no trailing slash),<lastmod>(today's ISO date), and<changefreq>.<changefreq>policy:dailyfor/blogand/use-casesindex pages,weeklyfor detail pages,monthlyfor marketing copy (/pricing,/docs,/for-agents),weeklyfor everything else..mdmirrors inherit their HTML counterpart's frequency./app/*,/login,/claim) are excluded from the sitemap andDisallow'd in robots.txt. Both lists are derived from a singleAUTH_GATED_PREFIXESconstant so they cannot drift.https://instanode.dev/sitemap.xmlso they find it without guessing.Test plan
npm run buildproducesdist/sitemap.xmlanddist/robots.txtxmllint --noout dist/sitemap.xmlvalidates as well-formed XMLwc -l dist/sitemap.xmlshows 1163 lines (232 URLs × 5 + header/footer)grep -c '<loc>'reports 232 — comfortably above the ~116 baseline/app/,/login, or/claimpaths leak into the sitemap🤖 Generated with Claude Code