docs: add sitemap + robots.txt for search-engine indexing - #1528
Merged
Merged
Conversation
Register the @astrojs/sitemap integration so the docs build emits sitemap-index.xml (Starlight auto-injects <link rel="sitemap"> into every page's <head>), and ship a public/robots.txt that allows a full crawl and points at the sitemap. Declares @astrojs/sitemap as a direct dependency (already resolved transitively) and documents both in the docs README. Helps search engines reliably discover and index the documentation pages.
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
@astrojs/sitemapintegration indocs/astro.config.mjs. The docs build now emits/sitemap-index.xmland Starlight auto-injects<link rel="sitemap">into every page's<head>.docs/public/robots.txt(allow-all crawl +Sitemap:pointer), served at the site root.@astrojs/sitemapas a direct dependency (already resolved transitively via Starlight; one-line lockfile change).docs/README.md.Standard SEO fundamentals so search engines reliably discover and index the documentation pages. No page content or UI changes.
Test plan
npm run buildindocs/succeeds and logs[@astrojs/sitemap] `sitemap-index.xml` createddist/sitemap-index.xml+dist/sitemap-0.xmlgenerated, covering all 25 pagesdist/robots.txtserved at root with theSitemap:directive<link rel="sitemap" href="/sitemap-index.xml">present in built page<head>