Add robots.txt with absolute Sitemap URL#161
Open
alexwolson wants to merge 1 commit into
Open
Conversation
jekyll-sitemap's default generated robots.txt uses a relative Sitemap
path ("/sitemap.xml"), which is invalid per spec - the directive
requires an absolute URL. A root-level robots.txt overrides the
gem's generated one.
Fixes #160
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Pa11y Accessibility Report✅ All pages passed — 0 warning(s) (WCAG2AA) Homepage✅ No issues found. Event✅ No issues found. Project✅ No issues found. Person✅ No issues found. Organization✅ No issues found. Venue✅ No issues found. Resource✅ No issues found. Tag✅ No issues found. Category✅ No issues found. |
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
robots.txtas invalid: theSitemap:directive was a relative path (/sitemap.xml), which violates the spec requiring an absolute URL.robots.txtexisted in this repo — it's auto-generated by thejekyll-sitemapgem with a relative Sitemap URL. Adding a root-levelrobots.txtoverrides that default with the correct absolute URL.Fixes #160
Test plan
https://civictech.ca/robots.txtserves the new content (Sitemap: https://civictech.ca/sitemap.xml)🤖 Generated with Claude Code