Skip to content

feat(app): serve a root-domain sitemap.xml - #550

Open
claude[bot] wants to merge 1 commit into
mainfrom
feat/root-sitemap-xml
Open

claude[bot] wants to merge 1 commit into
mainfrom
feat/root-sitemap-xml

Conversation

@claude

@claude claude Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Requested via Slack thread

One of five PRs replacing #530, which bundled all five root-domain discovery fixes into a single change.

Summary

Before: https://docs.page/sitemap.xml returns a 404. Every repository hosted on docs.page gets its own generated sitemap under its own path, but nothing covers the docs.page root site, so a crawler that discovers pages through sitemaps finds nothing at all for the root domain.

After: that same URL returns an XML sitemap listing the root-level pages that actually resolve — today that is just the homepage — served as application/xml with a day-long edge TTL.

In short: sitemap-driven crawlers get a real entry point for the root domain instead of a dead URL.

How: a new static App Router route at app/src/app/sitemap.xml/route.ts holds the XML as a build-time constant, matching the shape of the per-repo sitemaps. Its cache policy comes from a new ROOT_SITEMAP_CACHE_HEADERS constant in app/src/proxy.ts, using the same values as the existing root llms.txt route (day-long edge TTL, hourly browser revalidation).

Scope

  • app/ (hosted site, MCP, Ask AI)
  • packages/cli/
  • packages/mdx-bundler/
  • docs/ (product documentation)
  • Repo / CI / other

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactor / chore

Test plan

  • biome ci . clean (the check CI runs)
  • bun test — 140 pass, 0 fail
  • tsc --noEmit in app/ — clean

Notes for reviewers

  • The sitemap intentionally lists only the homepage; it is the only root-level HTML page today. A comment in the route says to add entries if more appear.
  • Branch is cut from main, so this merges independently of the other four PRs.
  • The root robots.txt PR adds a Sitemap: line pointing at this file, so merging this one first is the tidier order.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y5HaatshAzKUdXWYUbAC4a


Generated by Claude Code

https://docs.page/sitemap.xml returned 404. Every hosted repo has its own
generated sitemap, but nothing covered the root marketing site, so the root
domain was invisible to sitemap-driven crawling.

Adds a static App Router route serving a sitemap listing the root-level HTML
pages that actually resolve (currently just the homepage), with cache policy
via a new ROOT_SITEMAP_CACHE_HEADERS constant.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y5HaatshAzKUdXWYUbAC4a
@railway-app

railway-app Bot commented Sep 8, 2026

Copy link
Copy Markdown

🚅 Deployed to the docs.page-pr-550 environment in docs.page

Service Status Web Updated
docs.page ✅ Success (View Logs) Web Sep 8, 2026 at 10:28 am UTC

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