Skip to content

fix: align sitemap routes with canonical intent - #50

Merged
sarthakagrawal927 merged 1 commit into
mainfrom
fix/sitemap-canonicals
Aug 15, 2026
Merged

fix: align sitemap routes with canonical intent#50
sarthakagrawal927 merged 1 commit into
mainfrom
fix/sitemap-canonicals

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

Closes #47

Problem

The live sitemap listed /faq and /login with the homepage canonical (full production crawl on 2026-08-14: 4 direct-200 sitemap URLs, 2 canonical mismatches).

What changed

The runtime fixes shipped in #48:

  • /faq got an explicit self-canonical (canonicalPath="/faq").
  • /login was removed from public/sitemap.xml (it is an account route, not a public content page) and given X-Robots-Tag: noindex, follow.

This PR adds the missing regression check for sitemap/canonical parity so the fix cannot silently regress:

  • For every URL in public/sitemap.xml, resolve its landing-astro source page and assert it declares a self-canonical (canonicalPath == its own pathname). The homepage keeps the Layout default /.
  • Assert /login never re-enters the sitemap.
  • Reuses the existing sitemapUrls() helper and AGENT_SURFACE catalog.

Verification

  • pnpm test — 97 passed (includes the new parity test).
  • pnpm quality — lint 0 errors, typecheck, build, and hygiene all green.

Constraints honored

  • No product behavior or visible UI change.
  • No deploy, migration, or production config/secrets touched.
  • /login stays out of the sitemap; /faq keeps its self-canonical.

Closes #47

Issue #47: the live sitemap listed /faq and /login with the homepage
canonical. The runtime fixes (self-canonical for /faq, /login removed
from the sitemap, noindex on /login) shipped in #48. This adds the
missing regression guard so the parity cannot silently regress:

- For every URL in public/sitemap.xml, resolve its landing-astro source
  page and assert it declares a self-canonical (canonicalPath == its own
  pathname). The homepage keeps the Layout default '/'.
- Assert /login never re-enters the sitemap.
- Reuses the existing sitemapUrls() helper and AGENT_SURFACE catalog.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
reader 611d9da Aug 14 2026, 11:25 PM

@sarthakagrawal927
sarthakagrawal927 merged commit 4b0988b into main Aug 15, 2026
2 checks passed
@sarthakagrawal927
sarthakagrawal927 deleted the fix/sitemap-canonicals branch August 15, 2026 07:12
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.

Align public sitemap routes with canonical intent

1 participant