Repository navigation
docs: add robots.txt with sitemap directive to fix AI crawler discoverability - #30503
Merged
Merged
Conversation
1 of 4 tasks
…ility Add docs/public/robots.txt with a Sitemap directive pointing to the sitemap-index.xml generated by @astrojs/sitemap. Also update root .gitignore to allow docs/public/robots.txt to be tracked (the *.txt rule was blocking it). Agent-Logs-Url: https://github.com/github/gh-aw/sessions/34744291-8995-4f84-9ca3-f034e20bcdcd Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/34744291-8995-4f84-9ca3-f034e20bcdcd Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix sitemap generation on docs site
docs: add robots.txt with sitemap directive to fix AI crawler discoverability
May 6, 2026
pelikhan
approved these changes
May 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a robots.txt file for the docs site so crawlers can discover the generated sitemap (notably sitemap-index.xml), and updates .gitignore to ensure the new file is tracked despite existing *.txt ignore rules.
Changes:
- Added
docs/public/robots.txtthat allows all crawlers and declares the sitemap URL. - Updated
.gitignoreto un-ignoredocs/public/robots.txtso it’s committed.
Show a summary per file
| File | Description |
|---|---|
| docs/public/robots.txt | Introduces a robots file that declares the sitemap location for crawler discovery. |
| .gitignore | Adds an exception so docs/public/robots.txt is not excluded by *.txt ignore rules. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/2 changed files
- Comments generated: 1
Comment on lines
+3
to
+4
|
|
||
| Sitemap: https://github.github.com/gh-aw/sitemap-index.xml |
This was referenced May 6, 2026
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.
https://github.github.com/gh-aw/sitemap.xmlwas returning 404, blocking AI crawlers from discovering interior pages. The@astrojs/sitemapintegration was already correctly wired up inastro.config.mjsandpackage.json— the missing piece was arobots.txtto surface the sitemap location to crawlers.Changes
docs/public/robots.txt(new): Permits all crawlers and declaresSitemap: https://github.github.com/gh-aw/sitemap-index.xml.gitignore: Added!docs/public/robots.txtexception after the*.txtwildcard rule that was silently preventing the file from being trackedNote:
@astrojs/sitemapgeneratessitemap-index.xml(notsitemap.xml). The<link rel="sitemap">tag is injected into all page heads automatically by the integration at build time.