Skip to content

feat(docs): add sitemap.xml + robots.txt for SEO#15

Merged
rqbazan merged 2 commits into
mainfrom
feat/docs-sitemap-robots
May 20, 2026
Merged

feat(docs): add sitemap.xml + robots.txt for SEO#15
rqbazan merged 2 commits into
mainfrom
feat/docs-sitemap-robots

Conversation

@rqbazan
Copy link
Copy Markdown
Member

@rqbazan rqbazan commented May 20, 2026

Summary

  • New SSR route src/routes/sitemap[.]xml.ts builds the sitemap from source.getPages(); prerendered to dist/client/sitemap.xml at build via tanstackStart({ pages: [...] }).
  • public/robots.txt allows all crawlers, blocks /api/, and references the sitemap URL.
  • .lighthouserc.cjs now parses dist/client/sitemap.xml instead of walking content/docs — single source of truth for crawler + LHCI audit URLs.
  • Prerender all static routes: site is effectively static aside from /api/search (Orama). crawlLinks: true from / discovers all docs HTML pages + their .mdx companions (server.ts rewrite). 46 files served from Cloudflare's static asset binding instead of invoking the worker per request.

Test plan

  • pnpm --filter docsite build prerenders 46 pages: home, sitemap, llms.txt/full.txt, 21 docs HTML + 21 .mdx
  • pnpm --filter docsite exec tsc --noEmit passes
  • node -e "require('./.lighthouserc.cjs')" parses 22 URLs from the static sitemap
  • pnpm --filter docsite check:seo passes in CI (LHCI assertions still green; performance score should improve)
  • After deploy: curl https://env.oss.variable.land/sitemap.xml and robots.txt return the prerendered files
  • After deploy: docs pages load from edge (no worker invocation in CF logs for /docs/*)

🤖 Generated with Claude Code

Sitemap is generated by an SSR route at /sitemap.xml and prerendered to
dist/client/sitemap.xml at build time. LHCI now parses the static
sitemap to derive its audit URL list, removing the manual content/docs
walk and giving us a single source of truth for crawler + audit URLs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vland-bot
Copy link
Copy Markdown
Contributor

vland-bot Bot commented May 20, 2026

Preview release

Latest commit: ebeecfb

No packages have been released.

Site is effectively static aside from /api/search (Orama search index).
Enable crawlLinks from / to discover docs HTML pages + their .mdx
companions (server.ts rewrites /docs/foo.mdx -> /raw/foo), and seed
the routes that aren't linked from HTML (llms.txt, llms-full.txt,
sitemap.xml). Filter excludes /api/* and hash anchors.

Result: 46 prerendered files served directly from Cloudflare's static
asset binding instead of invoking the worker per request.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rqbazan rqbazan merged commit 23ba566 into main May 20, 2026
4 checks passed
@rqbazan rqbazan deleted the feat/docs-sitemap-robots branch May 20, 2026 01:19
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