Skip to content

chore(seo): add sitemaps and per-page canonical to docs and site#31

Merged
winter100004 merged 1 commit into
mainfrom
chore/seo-sitemaps-canonical
Jun 15, 2026
Merged

chore(seo): add sitemaps and per-page canonical to docs and site#31
winter100004 merged 1 commit into
mainfrom
chore/seo-sitemaps-canonical

Conversation

@winter100004

Copy link
Copy Markdown
Contributor

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.xml returned 404), so Google discovered URL variants and consolidated them instead of indexing the canonical URLs directly.

What

  • docs (VitePress) — emit a sitemap (hostname: https://docs.openpicker.dev) and add a self-referential canonical per page via transformPageData. With cleanUrls, both the sitemap entries and the canonicals 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/ (single-page marketing site; it already sets a self canonical).

Verification

  • docs build ✅ → generated sitemap.xml lists clean URLs with git lastmod; canonical present per page (/guide/getting-started…/guide/getting-started, index → …/).
  • site build ✅ → dist/sitemap.xml served at /sitemap.xml.
  • biome check

Follow-up (manual)

Submit each sitemap in the corresponding Search Console property:

  • https://openpicker.dev/sitemap.xml
  • https://docs.openpicker.dev/sitemap.xml

🤖 Generated with Claude Code

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>
@winter100004
winter100004 merged commit 45a2f62 into main Jun 15, 2026
1 of 3 checks passed
@winter100004
winter100004 deleted the chore/seo-sitemaps-canonical branch June 15, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant