Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions src/libraries/libraries.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Base library data - lightweight, stays in main bundle
// Extended library data (with React nodes, testimonials, etc.) is in individual library files

import { redirect } from '@tanstack/react-router'
import type { LibrarySlim, LibraryId } from './types'

export const query: LibrarySlim = {
Expand Down Expand Up @@ -413,21 +412,6 @@ export const mcp: LibrarySlim = {
docsRoot: 'docs/mcp',
defaultDocs: 'overview',
visible: false,
handleRedirects: (href: string) => {
const pathMap: Record<string, string> = {
overview: 'mcp/mcp-overview',
connecting: 'mcp/mcp-connecting',
tools: 'mcp/mcp-tools',
}
const mcpDocsMatch = href.match(/\/mcp\/(latest|v1)\/docs\/(.*)/)
if (mcpDocsMatch) {
const newPath = pathMap[mcpDocsMatch[2]] || 'mcp/mcp-overview'
throw redirect({ href: `/cli/latest/docs/${newPath}` })
}
if (/\/mcp(\/latest)?$/.test(href)) {
throw redirect({ href: '/cli/latest/docs/mcp/mcp-overview' })
}
},
}

export const cli: LibrarySlim = {
Expand Down
1 change: 1 addition & 0 deletions src/routes/$libraryId/$version.index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const landingComponents: Partial<
ai: React.lazy(() => import('~/components/landing/AiLanding')),
devtools: React.lazy(() => import('~/components/landing/DevtoolsLanding')),
cli: React.lazy(() => import('~/components/landing/CliLanding')),
mcp: React.lazy(() => import('~/components/landing/McpLanding')),
}

export const Route = createFileRoute('/$libraryId/$version/')({
Expand Down
Loading