chore(seo): add sitemaps and per-page canonical to docs and site#31
Merged
Conversation
Google Search Console reported "Page with redirect" and "Alternate page with proper canonical tag" — both benign (intentional .html→clean and www→apex redirects, and correctly-honored canonicals). The actionable gap was no sitemap on either site (sitemap.xml was 404), so Google relied on crawling URL variants rather than the canonical URLs. - docs (VitePress): emit a sitemap (hostname docs.openpicker.dev) and add a self-referential canonical per page via transformPageData. With cleanUrls the canonical/sitemap entries are the clean URLs, so .html variants and the production *.workers.dev origin consolidate to them. - site: add a static public/sitemap.xml listing https://openpicker.dev/ (the marketing site is a single page; it already sets a self canonical). Submit each sitemap in the corresponding Search Console property. Co-Authored-By: Claude Opus 4.8 (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.
Why
Google Search Console flagged "Page with redirect" and "Alternate page with proper canonical tag." Both are benign — they're our intentional redirects (
*.html→ clean URL via cleanUrls,www→ apex) and correctly-honored canonicals. The one actionable gap: neither site had a sitemap (/sitemap.xmlreturned 404), so Google discovered URL variants and consolidated them instead of indexing the canonical URLs directly.What
sitemap(hostname: https://docs.openpicker.dev) and add a self-referentialcanonicalper page viatransformPageData. WithcleanUrls, both the sitemap entries and the canonicals are the clean URLs, so.htmlvariants and the production*.workers.devorigin consolidate to them.public/sitemap.xmllistinghttps://openpicker.dev/(single-page marketing site; it already sets a self canonical).Verification
docs build✅ → generatedsitemap.xmllists clean URLs with gitlastmod;canonicalpresent per page (/guide/getting-started→…/guide/getting-started, index →…/).site build✅ →dist/sitemap.xmlserved at/sitemap.xml.biome check✅Follow-up (manual)
Submit each sitemap in the corresponding Search Console property:
https://openpicker.dev/sitemap.xmlhttps://docs.openpicker.dev/sitemap.xml🤖 Generated with Claude Code