Skip to content

feat(seo): add sitemap.ts enumerating routes + 225 components (#234)#291

Merged
bntvllnt merged 1 commit into
mainfrom
feat/234-sitemap-routes
May 10, 2026
Merged

feat(seo): add sitemap.ts enumerating routes + 225 components (#234)#291
bntvllnt merged 1 commit into
mainfrom
feat/234-sitemap-routes

Conversation

@bntvllnt
Copy link
Copy Markdown
Collaborator

Summary

Adds apps/registry/app/sitemap.ts emitting a programmatic sitemap from registry.json.

Section URLs Priority
Static (/, /components, /docs, /philosophy) 4 1.0 / 1.0 / 0.8 / 0.6
Component pages (/components/<name>) 225 0.7
Raw registry JSON (/r/registry.json + per-item /r/<name>.json) 226 0.3
Total ~455

Why include /r/*.json?

Agents (Cursor, Claude, Continue) discover the library via these endpoints. Listing them in the sitemap (low priority) makes them crawlable without polluting search-engine ranking signal.

Validation

  • Imports registry.json via Next.js JSON module support.
  • TypeScript types via next/MetadataRoute.Sitemap.
  • All lastModified set at request time so re-deploys refresh dates.

Test plan

  • After deploy: curl -s https://ui.vllnt.ai/sitemap.xml | xmllint --noout - passes (valid XML).
  • URL count ≈ 455.
  • Sample component URL (e.g. /components/button) appears with priority=0.7.

Depends on

Closes #234

@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

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

Project Deployment Actions Updated (UTC)
storybook Ready Ready Preview, Comment May 10, 2026 2:05pm
ui.vllnt.ai Ready Ready Preview, Comment May 10, 2026 2:05pm

Request Review

bntvllnt added a commit that referenced this pull request May 10, 2026
## Problem
PR #288 (the #266 a11y fix) added \`aria-controls\`, \`aria-haspopup\`,
and a \`React.useId()\` hook to the combobox. Those additions pushed the
\`forwardRef\` arrow function from 70 → 71 lines, tripping the project's
\`max-lines-per-function\` rule (limit 70). Every PR branched from main
after #288 inherits the lint failure on \`Quality Gates → Lint\` —
currently blocking #290 (#233 robots) and #291 (#234 sitemap).

## Fix
Extract the \`<PopoverContent>\` + \`<Command>\` + \`<CommandList>\` JSX
into a local \`ComboboxListPanel\` component. Pure structural refactor —
no runtime behavior change. Both consumers (\`packages/ui\` source and
\`apps/registry/registry/default\` copy) kept aligned per #266 / #269.

| Metric | Before | After |
|---|---|---|
| forwardRef arrow body | 71 lines | **52 lines** |
| Block including signature + closing | 73 lines | 62 lines |

## Validation
- Refactor preserves all ARIA attributes, refs, and event wiring.
- Both files stay byte-identical in semantic structure.
- Local \`wc -l\`: forwardRef block now 62 lines.

## Test plan
- [ ] CI \`Quality Gates → Lint\` passes on this PR.
- [ ] After merge, #290 and #291 re-run and lint passes.
- [ ] Combobox visual stories unchanged.

Refs #266

Co-authored-by: bntvllnt <bntvllnt@users.noreply.github.com>
Next.js MetadataRoute.Sitemap emitted from app/sitemap.ts:

- 4 static routes (home, /components, /docs, /philosophy) with
  priorities 1.0 / 1.0 / 0.8 / 0.6.
- 225 dynamic /components/<name> entries generated from
  registry.json (priority 0.7).
- Raw registry endpoints: /r/registry.json + /r/<name>.json
  (priority 0.3, indexed for agent discovery).

Total ≈ 455 URLs after deploy. Linked from robots.ts (#233).

Closes #234
@bntvllnt bntvllnt force-pushed the feat/234-sitemap-routes branch from 642bf89 to ada7185 Compare May 10, 2026 13:57
@bntvllnt bntvllnt merged commit 2da4e00 into main May 10, 2026
4 of 6 checks passed
@bntvllnt bntvllnt deleted the feat/234-sitemap-routes branch May 10, 2026 13:59
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.

seo: add app/sitemap.ts enumerating routes + 225 component pages

1 participant