Skip to content

Migrate docs site to package-based Geistdocs#537

Open
molebox wants to merge 1 commit into
mainfrom
migrate-geistdocs-package
Open

Migrate docs site to package-based Geistdocs#537
molebox wants to merge 1 commit into
mainfrom
migrate-geistdocs-package

Conversation

@molebox

@molebox molebox commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates apps/website from the vendored Geistdocs template to the new package-based architecture using @vercel/geistdocs 1.7.2.

The site was previously a copied-in instance of the old Geistdocs template (~50 vendored runtime files under components/geistdocs/, hooks/geistdocs/, custom chat/search routes, etc.). The package now owns the shared runtime, and the app keeps thin user-owned adapters.

What changed

Package-owned runtime

  • Routes replaced with package factories: createDocsPage, createChatRoute, createSearchRoute, createLlmsRoute, createDocsMarkdownRoute, createSitemapMarkdownRoute, and createProxy
  • AI chat now uses the package-owned Ask AI (AI SDK v6 inside the package); the custom chat UI, Dexie persistence, and app-level ai/@ai-sdk/react deps are removed
  • MDX components come from createMdxComponents (Callout, Mermaid, TypeTable, CodeBlock, Video, etc. — everything the content uses)
  • Styles: adopted the package geistdocs.css (Geist DS tokens) with @source entries for both the geistdocs and streamdown dists, per the geistdocs styling requirements
  • Deleted vendored components/geistdocs/*, hooks/geistdocs/*, chat/search implementations, feedback server action, and now-unused shadcn components

New for free

  • /agents.md agent-readiness route with Streamdown product metadata
  • /.well-known/mcp.json route (404s by design until MCP servers are configured)
  • GitHub edit links now point at the monorepo path (apps/website/content/docs/{path})
  • lastModified support in sitemap/RSS via the package source config

Preserved

  • Marketing landing page and /playground (incl. Vega-Lite custom renderer)
  • Live demos rendering against workspace streamdown + @streamdown/* packages
  • KaTeX/Mermaid MDX pipeline (remark-math / rehype-katex passed into defineGeistdocsSourceConfig)
  • All 24 docs pages, frontmatter (schema matches geistdocsFrontmatterSchema), redirects, OG images, RSS
  • A compat token layer in global.css maps the legacy shadcn theme tokens used by user-owned components onto Geist DS tokens

Dependency changes

  • @vercel/[email protected], next 16.1.5 → 16.2.6 (exact peer requirement)
  • Removed package-owned deps: ai, @ai-sdk/react, dexie, dexie-react-hooks, @orama/tokenizers, cmdk, vaul, mermaid, nanoid, next-themes, jotai, react-player

Future upgrades use npx @vercel/geistdocs update, which bumps the dependency without touching local adapter files.

Testing

  • pnpm turbo build --filter=website passes (all 25 docs pages, llms.mdx pages, and OG images prerender)
  • tsc --noEmit and pnpm check (ultracite) clean
  • Smoke-tested against next start:
    • /, /docs, /docs/getting-started, /docs/plugins/mermaid, /playground → 200
    • /llms.txt, /sitemap.md, /agents.md, /rss.xml, /docs/getting-started.md → 200 with correct markdown output
    • Accept: text/markdown negotiation on /docs/usage → 200
    • /docs/mermaid redirect → 308

Notes for reviewers

  • Chat history persistence (IndexedDB via Dexie) is gone — Ask AI is now fully package-owned
  • The visual theme moves to the current Geist design system shipped by the package; the homepage/playground keep their look via the compat token layer, but a visual pass on the preview deployment is recommended

Replace the vendored Geistdocs template in apps/website with the
published @vercel/geistdocs package. The package now owns the shared
runtime (layout, docs renderer, search, Ask AI chat, markdown routes,
proxy, and MDX components) while the app keeps thin user-owned
adapters.

- Add @vercel/geistdocs 1.7.2 and bump Next.js to 16.2.6 (exact peer)
- Delete ~50 vendored runtime files (components/geistdocs, hooks,
  custom chat UI, search/chat route implementations, feedback action)
- Replace routes with package factories: createDocsPage,
  createChatRoute, createSearchRoute, createLlmsRoute,
  createDocsMarkdownRoute, createSitemapMarkdownRoute, createProxy
- AI chat now uses the package-owned Ask AI (AI SDK v6 via the package)
- Adopt the package geistdocs.css theme with @source entries for the
  geistdocs and streamdown dists; add a compat token layer in
  global.css for user-owned components
- Add new /agents.md and /.well-known/mcp.json agent-readiness routes
  with Streamdown agent metadata in geistdocs.tsx
- Keep the landing page, playground, KaTeX/Mermaid MDX pipeline,
  redirects, and workspace streamdown live demos intact
- Prune dependencies now owned by the package (dexie, @orama/tokenizers,
  ai, @ai-sdk/react, etc.) and unused shadcn components
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
streamdown Ready Ready Preview, Comment, Open in v0 Jun 12, 2026 9:06am

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​next@​16.2.651100919970
Addednpm/​@​vercel/​geistdocs@​1.7.2771007499100
Addednpm/​@​vercel/​agent-readability@​0.2.17810010095100

View full report

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