feat(web): make the site discoverable by search engines and AI crawlers - #15
Merged
Merged
Conversation
The site had no sitemap, no meta description, and no canonical URL, and /docs and /docs/ both served the same page. - Set `site` in astro.config.mjs so absolute URLs resolve. - Add /sitemap.xml (hand-listed, three pages) and point robots.txt at it. - Add meta description, canonical link, Open Graph/Twitter tags, and SoftwareApplication JSON-LD to Base.astro; docs and changelog pass their own descriptions. - Link the website from the README. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VbEbcj91KchhypLx7swfQq
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Google and AI search tools were not finding junction.jnahian.me. Crawlers were allowed in, but the site gave them little to work with:
/sitemap.xmlreturned 404, androbots.txthad noSitemap:line./docsand/docs/both returned 200, which produced duplicate URLs.Changes
astro.config.mjs: setsite: "https://junction.jnahian.me"so absolute URLs resolve.src/pages/sitemap.xml.js: a hand-listed sitemap of the three pages, in the same pattern asllms.txt.js. This avoids adding@astrojs/sitemapfor three URLs. A new page must be added to its list.public/robots.txt: add theSitemap:line.Base.astro: add a meta description (defaults tosite.tagline), a canonical link without the trailing slash, Open Graph and Twitter tags, andSoftwareApplicationJSON-LD with the version fromrepo.js.docs.astroandchangelog.astro: pass their own descriptions.README.md: link the website.Test plan
npm run buildpasses.dist/sitemap.xmllists 3 absolute URLs, and each page has its own description and canonical link.npm testpasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01VbEbcj91KchhypLx7swfQq