Skip to content

feat: add XML sitemap via @astrojs/sitemap - #393

Open
isvictorious wants to merge 1 commit into
mainfrom
vramirez/edu-622-add-astrojssitemap-integration-for-xml-sitemap-seo
Open

feat: add XML sitemap via @astrojs/sitemap#393
isvictorious wants to merge 1 commit into
mainfrom
vramirez/edu-622-add-astrojssitemap-integration-for-xml-sitemap-seo

Conversation

@isvictorious

@isvictorious isvictorious commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes

The docs site had no XML sitemap — Starlight doesn't generate one by default, so search engines had no canonical index of our pages. This adds the @astrojs/sitemap integration.

Because site (https://www.tigerdata.com) and base (/docs) are already set in astro.config.ts, generated URLs correctly resolve as https://www.tigerdata.com/docs/.... It regenerates on every build, so new pages are included automatically with no per-page maintenance.

What's in the config:

  • filter() excludes the local-preview REST placeholder so it's never a canonical URL.
  • serialize() sets an accurate per-page lastmod from each doc's real git history (the one field Google actually uses — a blanket build-day date would be misleading), plus section priority (home 1.0, get-started 0.9, everything else 0.7) and changefreq: weekly. Pages with no source file (the generated REST reference) gracefully get no lastmod.

Verified locally (build:local): 674 URLs, per-page lastmod on all file-backed pages, placeholder excluded, home at priority 1.0.

Note: robots.txt discovery is intentionally out of scope here — the apex robots.txt (https://www.tigerdata.com/robots.txt) is owned by the main marketing site, not this app (which only serves /docs). Tracked separately in EDU-623.

Affected pages

Once you open the PR and the build runs, links to changed pages will appear here automatically. Please review them to make sure everything is OK, including rendered output, links, code blocks, and images.

Related Issues

Issue: EDU-622 (sub-task: EDU-623)

Checklist before requesting a review

  • - This is ready for review. If not, raise as a draft PR
  • - I have reviewed my changes.
  • - I have confirmed the content is technically accurate. (left for reviewer to confirm)
  • - I have tested any code that is added or updated on the latest available version. (n/a: build-time config, no user code snippets; verified via build)
  • - I have confirmed the content is free of typos or grammar errors.
  • - I have verified all images and videos are clear and match production (or dev for unreleased features). (n/a: no image/video changes)
  • - This references a feature that is public. If not, add a note and we can schedule the merge for after the feature release. (n/a: internal SEO infrastructure, not a product feature)

🤖 Generated with Claude Code

The docs site had no sitemap; Starlight doesn't generate one by default,
leaving search engines without a canonical page index. Add @astrojs/sitemap,
which inherits `site` + `base` so URLs resolve as
https://www.tigerdata.com/docs/...

- filter() excludes the local-preview REST placeholder
- serialize() sets an accurate per-page `lastmod` from each doc's real git
  history (the field Google actually uses), plus section `priority`
  (home 1.0, get-started 0.9, rest 0.7) and `changefreq: weekly`

Verified locally: 674 URLs, per-page lastmod on all file-backed pages.

Part of EDU-622

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tiger-data-docs Error Error Jul 14, 2026 6:44pm

@isvictorious
isvictorious marked this pull request as ready for review July 14, 2026 19:58
@isvictorious
isvictorious requested a review from a team July 14, 2026 19:58
@github-actions

Copy link
Copy Markdown

⚠️ Checklist Incomplete

Please complete all checklist items in the PR description before requesting review.

Unchecked items:

  • I have confirmed the content is technically accurate

Tip: If an item isn't relevant to your PR, mark it as checked and add "n/a" next to it.

@robsoncoelho

Copy link
Copy Markdown
Contributor

hey @isvictorious, we currently have a sitemap under https://www.tigerdata.com/docs/sitemap-0.xml

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.

2 participants