@vercel/geistdocs 1.24.1 → 1.25.1-canary.5684bb5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1 -1
- package/dist/components/blockquote.d.ts +3 -0
- package/dist/components/blockquote.d.ts.map +1 -0
- package/dist/components/blockquote.js +3 -0
- package/dist/components/callout.d.ts +13 -10
- package/dist/components/callout.d.ts.map +1 -1
- package/dist/components/callout.js +7 -7
- package/dist/components/code-block-tabs.d.ts +5 -2
- package/dist/components/code-block-tabs.d.ts.map +1 -1
- package/dist/components/code-block-tabs.js +28 -5
- package/dist/components/code-block.d.ts +2 -6
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +22 -68
- package/dist/components/command-prompt.d.ts.map +1 -1
- package/dist/components/command-prompt.js +3 -3
- package/dist/components/copy-prompt.d.ts.map +1 -1
- package/dist/components/copy-prompt.js +4 -4
- package/dist/components/mermaid.js +1 -1
- package/dist/controls.d.ts +8 -4
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +14 -14
- package/dist/footer.d.ts.map +1 -1
- package/dist/footer.js +6 -6
- package/dist/home-layout.js +1 -1
- package/dist/internal/app-route-manifest.d.ts +19 -0
- package/dist/internal/app-route-manifest.d.ts.map +1 -0
- package/dist/internal/app-route-manifest.js +121 -0
- package/dist/internal/app-route-scanner.d.ts +9 -0
- package/dist/internal/app-route-scanner.d.ts.map +1 -0
- package/dist/internal/app-route-scanner.js +149 -0
- package/dist/internal/chat/conversation.d.ts +4 -3
- package/dist/internal/chat/conversation.d.ts.map +1 -1
- package/dist/internal/chat/conversation.js +5 -5
- package/dist/internal/chat/copy-chat.d.ts.map +1 -1
- package/dist/internal/chat/copy-chat.js +13 -10
- package/dist/internal/chat/dots-spinner.d.ts +5 -0
- package/dist/internal/chat/dots-spinner.d.ts.map +1 -0
- package/dist/internal/chat/dots-spinner.js +15 -0
- package/dist/internal/chat/message-metadata.d.ts.map +1 -1
- package/dist/internal/chat/message-metadata.js +8 -7
- package/dist/internal/chat/message.d.ts.map +1 -1
- package/dist/internal/chat/message.js +5 -5
- package/dist/internal/chat/prompt-input.d.ts +1 -1
- package/dist/internal/chat/prompt-input.d.ts.map +1 -1
- package/dist/internal/chat/prompt-input.js +25 -27
- package/dist/internal/chat/shell.d.ts.map +1 -1
- package/dist/internal/chat/shell.js +27 -19
- package/dist/internal/chat/sources.d.ts +3 -1
- package/dist/internal/chat/sources.d.ts.map +1 -1
- package/dist/internal/chat/sources.js +6 -6
- package/dist/internal/chat/suggestion.d.ts +11 -6
- package/dist/internal/chat/suggestion.d.ts.map +1 -1
- package/dist/internal/chat/suggestion.js +5 -5
- package/dist/internal/docs-page-error-boundary.d.ts.map +1 -1
- package/dist/internal/docs-page-error-boundary.js +3 -3
- package/dist/internal/external-arrow.d.ts.map +1 -1
- package/dist/internal/external-arrow.js +1 -1
- package/dist/internal/footer/rss-button.d.ts.map +1 -1
- package/dist/internal/footer/rss-button.js +3 -3
- package/dist/internal/github-button.d.ts.map +1 -1
- package/dist/internal/github-button.js +3 -3
- package/dist/internal/navbar/desktop-menu.d.ts.map +1 -1
- package/dist/internal/navbar/desktop-menu.js +3 -3
- package/dist/internal/navbar/mobile-menu.d.ts.map +1 -1
- package/dist/internal/navbar/mobile-menu.js +3 -3
- package/dist/internal/navbar/navbar-logo.d.ts.map +1 -1
- package/dist/internal/navbar/navbar-logo.js +6 -8
- package/dist/internal/navbar/navbar-shell.d.ts.map +1 -1
- package/dist/internal/navbar/navbar-shell.js +1 -1
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +19 -20
- package/dist/internal/page-breadcrumb.d.ts.map +1 -1
- package/dist/internal/page-breadcrumb.js +3 -3
- package/dist/internal/page-footer.d.ts.map +1 -1
- package/dist/internal/page-footer.js +2 -2
- package/dist/internal/provider-client.d.ts.map +1 -1
- package/dist/internal/provider-client.js +9 -9
- package/dist/internal/search.d.ts.map +1 -1
- package/dist/internal/search.js +2 -2
- package/dist/internal/sidebar-tree.d.ts.map +1 -1
- package/dist/internal/sidebar-tree.js +9 -7
- package/dist/internal/sidebar.d.ts.map +1 -1
- package/dist/internal/sidebar.js +6 -8
- package/dist/internal/toc-items.d.ts.map +1 -1
- package/dist/internal/toc-items.js +1 -1
- package/dist/internal/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/internal/ui/dropdown-menu.js +5 -5
- package/dist/internal/ui/navigation-menu.d.ts.map +1 -1
- package/dist/internal/ui/navigation-menu.js +2 -2
- package/dist/internal/ui/popover.d.ts.map +1 -1
- package/dist/internal/ui/popover.js +1 -1
- package/dist/internal/ui/scroll-area.d.ts.map +1 -1
- package/dist/internal/ui/scroll-area.js +1 -1
- package/dist/layout.js +1 -1
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +9 -3
- package/dist/mobile-docs-bar.d.ts.map +1 -1
- package/dist/mobile-docs-bar.js +1 -2
- package/dist/navbar.js +3 -2
- package/dist/next.d.ts +6 -0
- package/dist/next.d.ts.map +1 -0
- package/dist/next.js +52 -0
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +8 -3
- package/dist/proxy.d.ts +2 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +28 -5
- package/dist/routes/llms.d.ts +1 -1
- package/dist/routes/llms.d.ts.map +1 -1
- package/dist/routes/llms.js +1 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +0 -2
- package/dist/versions.d.ts.map +1 -1
- package/dist/versions.js +5 -5
- package/docs/agents.md +2 -3
- package/docs/llms.txt +165 -98
- package/docs/manifest.json +2 -11
- package/docs/pages/configuration.md +8 -0
- package/docs/pages/md.md +8 -5
- package/docs/pages/migration.md +12 -12
- package/docs/pages/proxy.md +20 -1
- package/docs/pages/syntax.md +112 -11
- package/docs/pages/versioned-docs.md +3 -3
- package/docs/sitemap.md +1 -2
- package/package.json +14 -102
- package/styles.css +3 -2
- package/template/AGENTS.md +12 -0
- package/template/app/[lang]/(home)/components/hero.tsx +2 -2
- package/template/app/[lang]/(home)/components/one-two-section.tsx +9 -1
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +1 -1
- package/template/app/[lang]/(home)/page.tsx +5 -6
- package/template/app/[lang]/layout.tsx +7 -4
- package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +0 -1
- package/template/app/styles/geistdocs.css +17 -14
- package/template/content/docs/configuration.cn.mdx +2 -2
- package/template/content/docs/configuration.mdx +8 -0
- package/template/content/docs/md.mdx +8 -5
- package/template/content/docs/migration.mdx +12 -12
- package/template/content/docs/proxy.mdx +20 -1
- package/template/content/docs/syntax.mdx +112 -11
- package/template/content/docs/versioned-docs.mdx +3 -3
- package/template/lib/geistdocs/config.tsx +0 -5
- package/template/next.config.ts +19 -5
- package/template/package.json +5 -7
- package/theme.css +71 -700
- package/dist/assets/icons/icon-acronym-ts.d.ts +0 -5
- package/dist/assets/icons/icon-acronym-ts.d.ts.map +0 -1
- package/dist/assets/icons/icon-acronym-ts.js +0 -4
- package/dist/assets/icons/icon-agents.d.ts +0 -5
- package/dist/assets/icons/icon-agents.d.ts.map +0 -1
- package/dist/assets/icons/icon-agents.js +0 -4
- package/dist/assets/icons/icon-api.d.ts +0 -5
- package/dist/assets/icons/icon-api.d.ts.map +0 -1
- package/dist/assets/icons/icon-api.js +0 -4
- package/dist/assets/icons/icon-arrow-up-right-small.d.ts +0 -8
- package/dist/assets/icons/icon-arrow-up-right-small.d.ts.map +0 -1
- package/dist/assets/icons/icon-arrow-up-right-small.js +0 -4
- package/dist/assets/icons/icon-arrow-up-right.d.ts +0 -5
- package/dist/assets/icons/icon-arrow-up-right.d.ts.map +0 -1
- package/dist/assets/icons/icon-arrow-up-right.js +0 -4
- package/dist/assets/icons/icon-check.d.ts +0 -5
- package/dist/assets/icons/icon-check.d.ts.map +0 -1
- package/dist/assets/icons/icon-check.js +0 -4
- package/dist/assets/icons/icon-chevron-down-small.d.ts +0 -8
- package/dist/assets/icons/icon-chevron-down-small.d.ts.map +0 -1
- package/dist/assets/icons/icon-chevron-down-small.js +0 -7
- package/dist/assets/icons/icon-chevron-right.d.ts +0 -5
- package/dist/assets/icons/icon-chevron-right.d.ts.map +0 -1
- package/dist/assets/icons/icon-chevron-right.js +0 -4
- package/dist/assets/icons/icon-clock.d.ts +0 -5
- package/dist/assets/icons/icon-clock.d.ts.map +0 -1
- package/dist/assets/icons/icon-clock.js +0 -4
- package/dist/assets/icons/icon-copy.d.ts +0 -5
- package/dist/assets/icons/icon-copy.d.ts.map +0 -1
- package/dist/assets/icons/icon-copy.js +0 -4
- package/dist/assets/icons/icon-display-small.d.ts +0 -5
- package/dist/assets/icons/icon-display-small.d.ts.map +0 -1
- package/dist/assets/icons/icon-display-small.js +0 -4
- package/dist/assets/icons/icon-display.d.ts +0 -5
- package/dist/assets/icons/icon-display.d.ts.map +0 -1
- package/dist/assets/icons/icon-display.js +0 -4
- package/dist/assets/icons/icon-file-text.d.ts +0 -5
- package/dist/assets/icons/icon-file-text.d.ts.map +0 -1
- package/dist/assets/icons/icon-file-text.js +0 -4
- package/dist/assets/icons/icon-folder-open.d.ts +0 -5
- package/dist/assets/icons/icon-folder-open.d.ts.map +0 -1
- package/dist/assets/icons/icon-folder-open.js +0 -4
- package/dist/assets/icons/icon-linked.d.ts +0 -5
- package/dist/assets/icons/icon-linked.d.ts.map +0 -1
- package/dist/assets/icons/icon-linked.js +0 -4
- package/dist/assets/icons/icon-logs.d.ts +0 -5
- package/dist/assets/icons/icon-logs.d.ts.map +0 -1
- package/dist/assets/icons/icon-logs.js +0 -4
- package/dist/assets/icons/icon-menu-alt.d.ts +0 -5
- package/dist/assets/icons/icon-menu-alt.d.ts.map +0 -1
- package/dist/assets/icons/icon-menu-alt.js +0 -4
- package/dist/assets/icons/icon-message.d.ts +0 -5
- package/dist/assets/icons/icon-message.d.ts.map +0 -1
- package/dist/assets/icons/icon-message.js +0 -4
- package/dist/assets/icons/icon-moon-small.d.ts +0 -5
- package/dist/assets/icons/icon-moon-small.d.ts.map +0 -1
- package/dist/assets/icons/icon-moon-small.js +0 -4
- package/dist/assets/icons/icon-moon.d.ts +0 -5
- package/dist/assets/icons/icon-moon.d.ts.map +0 -1
- package/dist/assets/icons/icon-moon.js +0 -4
- package/dist/assets/icons/icon-openai.d.ts +0 -5
- package/dist/assets/icons/icon-openai.d.ts.map +0 -1
- package/dist/assets/icons/icon-openai.js +0 -4
- package/dist/assets/icons/icon-plus-circle.d.ts +0 -5
- package/dist/assets/icons/icon-plus-circle.d.ts.map +0 -1
- package/dist/assets/icons/icon-plus-circle.js +0 -4
- package/dist/assets/icons/icon-refresh-counter-clockwise.d.ts +0 -5
- package/dist/assets/icons/icon-refresh-counter-clockwise.d.ts.map +0 -1
- package/dist/assets/icons/icon-refresh-counter-clockwise.js +0 -4
- package/dist/assets/icons/icon-robot.d.ts +0 -5
- package/dist/assets/icons/icon-robot.d.ts.map +0 -1
- package/dist/assets/icons/icon-robot.js +0 -4
- package/dist/assets/icons/icon-sandbox.d.ts +0 -5
- package/dist/assets/icons/icon-sandbox.d.ts.map +0 -1
- package/dist/assets/icons/icon-sandbox.js +0 -4
- package/dist/assets/icons/icon-slash-forward.d.ts +0 -8
- package/dist/assets/icons/icon-slash-forward.d.ts.map +0 -1
- package/dist/assets/icons/icon-slash-forward.js +0 -4
- package/dist/assets/icons/icon-sparkles.d.ts +0 -5
- package/dist/assets/icons/icon-sparkles.d.ts.map +0 -1
- package/dist/assets/icons/icon-sparkles.js +0 -4
- package/dist/assets/icons/icon-sun-small.d.ts +0 -5
- package/dist/assets/icons/icon-sun-small.d.ts.map +0 -1
- package/dist/assets/icons/icon-sun-small.js +0 -4
- package/dist/assets/icons/icon-sun.d.ts +0 -5
- package/dist/assets/icons/icon-sun.d.ts.map +0 -1
- package/dist/assets/icons/icon-sun.js +0 -4
- package/dist/assets/icons/icon-trash.d.ts +0 -5
- package/dist/assets/icons/icon-trash.d.ts.map +0 -1
- package/dist/assets/icons/icon-trash.js +0 -4
- package/dist/assets/icons/icon-user.d.ts +0 -5
- package/dist/assets/icons/icon-user.d.ts.map +0 -1
- package/dist/assets/icons/icon-user.js +0 -4
- package/dist/assets/icons/icon-workflow.d.ts +0 -5
- package/dist/assets/icons/icon-workflow.d.ts.map +0 -1
- package/dist/assets/icons/icon-workflow.js +0 -4
- package/dist/assets/icons/icon-wrench.d.ts +0 -5
- package/dist/assets/icons/icon-wrench.d.ts.map +0 -1
- package/dist/assets/icons/icon-wrench.js +0 -4
- package/dist/assets/icons/index.d.ts +0 -35
- package/dist/assets/icons/index.d.ts.map +0 -1
- package/dist/assets/icons/index.js +0 -35
- package/dist/assets/logos/index.d.ts +0 -17
- package/dist/assets/logos/index.d.ts.map +0 -1
- package/dist/assets/logos/index.js +0 -17
- package/dist/assets/logos/logo-ai-elements.d.ts +0 -5
- package/dist/assets/logos/logo-ai-elements.d.ts.map +0 -1
- package/dist/assets/logos/logo-ai-elements.js +0 -5
- package/dist/assets/logos/logo-ai-sdk.d.ts +0 -5
- package/dist/assets/logos/logo-ai-sdk.d.ts.map +0 -1
- package/dist/assets/logos/logo-ai-sdk.js +0 -5
- package/dist/assets/logos/logo-chat-sdk.d.ts +0 -5
- package/dist/assets/logos/logo-chat-sdk.d.ts.map +0 -1
- package/dist/assets/logos/logo-chat-sdk.js +0 -5
- package/dist/assets/logos/logo-eve.d.ts +0 -5
- package/dist/assets/logos/logo-eve.d.ts.map +0 -1
- package/dist/assets/logos/logo-eve.js +0 -5
- package/dist/assets/logos/logo-flags-sdk.d.ts +0 -5
- package/dist/assets/logos/logo-flags-sdk.d.ts.map +0 -1
- package/dist/assets/logos/logo-flags-sdk.js +0 -5
- package/dist/assets/logos/logo-icon-vercel.d.ts +0 -5
- package/dist/assets/logos/logo-icon-vercel.d.ts.map +0 -1
- package/dist/assets/logos/logo-icon-vercel.js +0 -4
- package/dist/assets/logos/logo-nextjs.d.ts +0 -5
- package/dist/assets/logos/logo-nextjs.d.ts.map +0 -1
- package/dist/assets/logos/logo-nextjs.js +0 -9
- package/dist/assets/logos/logo-streamdown.d.ts +0 -5
- package/dist/assets/logos/logo-streamdown.d.ts.map +0 -1
- package/dist/assets/logos/logo-streamdown.js +0 -5
- package/dist/assets/logos/logo-svelte-kit.d.ts +0 -5
- package/dist/assets/logos/logo-svelte-kit.d.ts.map +0 -1
- package/dist/assets/logos/logo-svelte-kit.js +0 -4
- package/dist/assets/logos/logo-turborepo.d.ts +0 -5
- package/dist/assets/logos/logo-turborepo.d.ts.map +0 -1
- package/dist/assets/logos/logo-turborepo.js +0 -5
- package/dist/assets/logos/logo-vercel-oss.d.ts +0 -5
- package/dist/assets/logos/logo-vercel-oss.d.ts.map +0 -1
- package/dist/assets/logos/logo-vercel-oss.js +0 -4
- package/dist/assets/logos/logo-workflow-sdk.d.ts +0 -5
- package/dist/assets/logos/logo-workflow-sdk.d.ts.map +0 -1
- package/dist/assets/logos/logo-workflow-sdk.js +0 -5
- package/dist/components/badge.d.ts +0 -11
- package/dist/components/badge.d.ts.map +0 -1
- package/dist/components/badge.js +0 -22
- package/dist/components/button-group.d.ts +0 -2
- package/dist/components/button-group.d.ts.map +0 -1
- package/dist/components/button-group.js +0 -2
- package/dist/components/button.d.ts +0 -2
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/button.js +0 -2
- package/dist/components/card.d.ts +0 -2
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/card.js +0 -2
- package/dist/components/dialog.d.ts +0 -13
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/dialog.js +0 -35
- package/dist/components/drawer.d.ts +0 -2
- package/dist/components/drawer.d.ts.map +0 -1
- package/dist/components/drawer.js +0 -3
- package/dist/components/input-group.d.ts +0 -2
- package/dist/components/input-group.d.ts.map +0 -1
- package/dist/components/input-group.js +0 -3
- package/dist/components/input.d.ts +0 -2
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/input.js +0 -2
- package/dist/components/kbd.d.ts +0 -2
- package/dist/components/kbd.d.ts.map +0 -1
- package/dist/components/kbd.js +0 -2
- package/dist/components/separator.d.ts +0 -2
- package/dist/components/separator.d.ts.map +0 -1
- package/dist/components/separator.js +0 -3
- package/dist/components/sheet.d.ts +0 -2
- package/dist/components/sheet.d.ts.map +0 -1
- package/dist/components/sheet.js +0 -3
- package/dist/components/sonner.d.ts +0 -2
- package/dist/components/sonner.d.ts.map +0 -1
- package/dist/components/sonner.js +0 -3
- package/dist/components/spinner.d.ts +0 -2
- package/dist/components/spinner.d.ts.map +0 -1
- package/dist/components/spinner.js +0 -2
- package/dist/components/switch.d.ts +0 -11
- package/dist/components/switch.d.ts.map +0 -1
- package/dist/components/switch.js +0 -12
- package/dist/components/textarea.d.ts +0 -2
- package/dist/components/textarea.d.ts.map +0 -1
- package/dist/components/textarea.js +0 -2
- package/dist/components/theme-aware-image.d.ts +0 -12
- package/dist/components/theme-aware-image.d.ts.map +0 -1
- package/dist/components/theme-aware-image.js +0 -8
- package/dist/components/theme-switcher.d.ts +0 -8
- package/dist/components/theme-switcher.d.ts.map +0 -1
- package/dist/components/theme-switcher.js +0 -37
- package/dist/components/tooltip.d.ts +0 -2
- package/dist/components/tooltip.d.ts.map +0 -1
- package/dist/components/tooltip.js +0 -3
- package/dist/internal/chat/shimmer.d.ts +0 -11
- package/dist/internal/chat/shimmer.d.ts.map +0 -1
- package/dist/internal/chat/shimmer.js +0 -22
- package/dist/internal/cn.d.ts +0 -3
- package/dist/internal/cn.d.ts.map +0 -1
- package/dist/internal/cn.js +0 -47
- package/dist/internal/ui/button-group.d.ts +0 -13
- package/dist/internal/ui/button-group.d.ts.map +0 -1
- package/dist/internal/ui/button-group.js +0 -26
- package/dist/internal/ui/button.d.ts +0 -12
- package/dist/internal/ui/button.d.ts.map +0 -1
- package/dist/internal/ui/button.js +0 -33
- package/dist/internal/ui/card.d.ts +0 -6
- package/dist/internal/ui/card.d.ts.map +0 -1
- package/dist/internal/ui/card.js +0 -14
- package/dist/internal/ui/drawer.d.ts +0 -8
- package/dist/internal/ui/drawer.d.ts.map +0 -1
- package/dist/internal/ui/drawer.js +0 -19
- package/dist/internal/ui/input-group.d.ts +0 -15
- package/dist/internal/ui/input-group.d.ts.map +0 -1
- package/dist/internal/ui/input-group.js +0 -44
- package/dist/internal/ui/input.d.ts +0 -3
- package/dist/internal/ui/input.d.ts.map +0 -1
- package/dist/internal/ui/input.js +0 -5
- package/dist/internal/ui/kbd.d.ts +0 -4
- package/dist/internal/ui/kbd.d.ts.map +0 -1
- package/dist/internal/ui/kbd.js +0 -8
- package/dist/internal/ui/separator.d.ts +0 -4
- package/dist/internal/ui/separator.d.ts.map +0 -1
- package/dist/internal/ui/separator.js +0 -7
- package/dist/internal/ui/sheet.d.ts +0 -13
- package/dist/internal/ui/sheet.d.ts.map +0 -1
- package/dist/internal/ui/sheet.js +0 -24
- package/dist/internal/ui/sonner.d.ts +0 -3
- package/dist/internal/ui/sonner.d.ts.map +0 -1
- package/dist/internal/ui/sonner.js +0 -20
- package/dist/internal/ui/spinner.d.ts +0 -3
- package/dist/internal/ui/spinner.d.ts.map +0 -1
- package/dist/internal/ui/spinner.js +0 -6
- package/dist/internal/ui/textarea.d.ts +0 -3
- package/dist/internal/ui/textarea.d.ts.map +0 -1
- package/dist/internal/ui/textarea.js +0 -5
- package/dist/internal/ui/tooltip.d.ts +0 -7
- package/dist/internal/ui/tooltip.d.ts.map +0 -1
- package/dist/internal/ui/tooltip.js +0 -16
- package/docs/pages/theme-aware-image.md +0 -59
- package/template/app/[lang]/(home)/components/centered-section.tsx +0 -32
- package/template/content/docs/theme-aware-image.mdx +0 -57
package/docs/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Geistdocs Package Documentation
|
|
2
2
|
|
|
3
|
-
These docs are bundled with `@vercel/geistdocs` 1.
|
|
3
|
+
These docs are bundled with `@vercel/geistdocs` 1.25.1-canary.5684bb5.
|
|
4
4
|
They describe how to build package-backed Geistdocs sites and how to use the package APIs from generated project adapters.
|
|
5
5
|
|
|
6
6
|
## Documentation Index
|
|
@@ -14,7 +14,7 @@ They describe how to build package-backed Geistdocs sites and how to use the pac
|
|
|
14
14
|
- [Syntax](pages/syntax.md): Supported MDX syntax including text formatting, code blocks, line highlighting, and Mermaid diagrams.
|
|
15
15
|
- [Geistdocs Provider](pages/provider.md): The root provider component that wraps your application to handle toast notifications, search, and analytics.
|
|
16
16
|
- [Versioned docs](pages/versioned-docs.md): Use createVersionedSources to configure stable, pre-release, or host-based documentation versions.
|
|
17
|
-
- [Proxy and markdown routes](pages/proxy.md): Configure createProxy with
|
|
17
|
+
- [Proxy and markdown routes](pages/proxy.md): Configure createProxy with generated route discovery, request hooks, markdown mappings, and a static Next.js matcher.
|
|
18
18
|
- [.md Extension](pages/md.md): Access any documentation page as raw Markdown by appending .md or .mdx to the URL for AI tool consumption.
|
|
19
19
|
- [Agent readiness](pages/agent-readiness.md): Generate /agents.md and /.well-known/mcp.json from Geistdocs config so agents can find docs, Markdown surfaces, API specs, and MCP endpoints.
|
|
20
20
|
- [Ask AI](pages/ask-ai.md): An AI-powered chat assistant with context-aware search, persistent history, and suggested prompts for your documentation.
|
|
@@ -26,7 +26,6 @@ They describe how to build package-backed Geistdocs sites and how to use the pac
|
|
|
26
26
|
- [Open in Chat](pages/open-in-chat.md): Transfer documentation context to AI chat platforms like ChatGPT, Claude, Cursor, and v0 with a single click.
|
|
27
27
|
- [RSS](pages/rss.md): An automatically generated RSS 2.0 feed that keeps users informed when documentation is published or updated.
|
|
28
28
|
- [Table of contents](pages/table-of-contents.md): Geistdocs builds the "On this page" outline from your headings, indents sub-headings under their parent, and tracks the active section along a straight vertical guide rail.
|
|
29
|
-
- [Theme-Aware Image](pages/theme-aware-image.md): A component that swaps images based on the active theme, built on top of Next.js Image.
|
|
30
29
|
|
|
31
30
|
---
|
|
32
31
|
|
|
@@ -424,7 +423,7 @@ Fix unrelated build failures first. A migration is safer when the starting point
|
|
|
424
423
|
|
|
425
424
|
## Install Geistdocs
|
|
426
425
|
|
|
427
|
-
Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting.
|
|
426
|
+
Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting. Geistdocs requires Next.js 16.3.3 or later within 16.x. Earlier 16.3 releases can retain an optional catch-all route's index content after a client navigation to a child page when Cache Components and Partial Prefetching are enabled.
|
|
428
427
|
|
|
429
428
|
For an existing project, use your package manager directly:
|
|
430
429
|
|
|
@@ -438,24 +437,26 @@ If you are starting from a generated Geistdocs project and moving content into i
|
|
|
438
437
|
pnpm dlx @vercel/geistdocs init --name my-docs
|
|
439
438
|
```
|
|
440
439
|
|
|
441
|
-
##
|
|
440
|
+
## Configure Next.js
|
|
442
441
|
|
|
443
|
-
Geistdocs
|
|
442
|
+
The Geistdocs Next.js integration composes Fumadocs MDX, enables automatic app-route discovery for agent-readable 404s, and preserves your Next.js configuration. Enable Cache Components in the same file:
|
|
444
443
|
|
|
445
444
|
```ts title="next.config.ts"
|
|
446
|
-
import {
|
|
445
|
+
import { createGeistdocs } from "@vercel/geistdocs/next";
|
|
447
446
|
import type { NextConfig } from "next";
|
|
448
447
|
|
|
449
|
-
const
|
|
448
|
+
const withGeistdocs = createGeistdocs();
|
|
450
449
|
|
|
451
450
|
const config: NextConfig = {
|
|
452
451
|
cacheComponents: true,
|
|
453
452
|
partialPrefetching: true,
|
|
454
453
|
};
|
|
455
454
|
|
|
456
|
-
export default
|
|
455
|
+
export default withGeistdocs(config);
|
|
457
456
|
```
|
|
458
457
|
|
|
458
|
+
Restart `next dev` after adding, deleting, or renaming an App Router page or route. Production builds always regenerate the route manifest.
|
|
459
|
+
|
|
459
460
|
Every root dynamic parameter needs at least one value from `generateStaticParams`. For a site with a `[lang]` root segment, return every configured language from the root layout:
|
|
460
461
|
|
|
461
462
|
```tsx title="app/[lang]/layout.tsx"
|
|
@@ -755,16 +756,14 @@ For a base-path application whose root page is documentation, add `"/"` to the s
|
|
|
755
756
|
Tailwind CSS v4 requires `@source` entries for package components and related dependencies.
|
|
756
757
|
|
|
757
758
|
```css title="app/styles/geistdocs.css"
|
|
758
|
-
@import "
|
|
759
|
+
@import "@vercel/geistcn/tailwind.css";
|
|
760
|
+
@import "@vercel/geistcn/styles.css";
|
|
759
761
|
@import "fumadocs-ui/css/shadcn.css";
|
|
760
762
|
@import "fumadocs-ui/css/preset.css";
|
|
761
|
-
@import "
|
|
762
|
-
|
|
763
|
-
@source "../../node_modules/@vercel/geistdocs/dist/**/*.js";
|
|
764
|
-
@source "../../node_modules/streamdown/dist/*.js";
|
|
763
|
+
@import "@vercel/geistdocs/theme.css";
|
|
765
764
|
```
|
|
766
765
|
|
|
767
|
-
|
|
766
|
+
Geistcn owns the Geist tokens, theme, typography, preflight, and animation utilities. The Geistdocs theme entry point remains during the compatibility migration for documentation and Fumadocs integration rules and to source the compiled runtime dependencies.
|
|
768
767
|
|
|
769
768
|
## Handle environment variables
|
|
770
769
|
|
|
@@ -836,6 +835,7 @@ Configure Geistdocs through user-owned files in the generated project. Runtime f
|
|
|
836
835
|
| File | Purpose |
|
|
837
836
|
| --- | --- |
|
|
838
837
|
| `geistdocs.tsx` | Site-level settings, including logo, nav, GitHub repo, AI prompt, agent-readiness metadata, translations, and feature flags. |
|
|
838
|
+
| `next.config.ts` | Composes Fumadocs MDX, discovers App Router routes, and configures Next.js. |
|
|
839
839
|
| `source.config.ts` | Configures Fumadocs collections with the package-provided schema, Markdown plugins, and syntax theme. |
|
|
840
840
|
| `lib/geistdocs/config.tsx` | Converts `geistdocs.tsx` exports into the package config using `defineConfig`. |
|
|
841
841
|
| `source.config.ts` | Configures Fumadocs collections with package-safe schemas and Markdown processing. |
|
|
@@ -1025,11 +1025,18 @@ To serve docs from the site root, use `route: "/"` in `content` and `baseUrl: "/
|
|
|
1025
1025
|
When Next.js mounts the application below a path, set the same value in `next.config.ts` and Geistdocs config:
|
|
1026
1026
|
|
|
1027
1027
|
```ts title="next.config.ts"
|
|
1028
|
+
import { createGeistdocs } from "@vercel/geistdocs/next";
|
|
1029
|
+
import type { NextConfig } from "next";
|
|
1030
|
+
|
|
1031
|
+
const withGeistdocs = createGeistdocs();
|
|
1032
|
+
|
|
1028
1033
|
const config: NextConfig = {
|
|
1029
1034
|
basePath: "/docs",
|
|
1030
1035
|
cacheComponents: true,
|
|
1031
1036
|
partialPrefetching: true,
|
|
1032
1037
|
};
|
|
1038
|
+
|
|
1039
|
+
export default withGeistdocs(config);
|
|
1033
1040
|
```
|
|
1034
1041
|
|
|
1035
1042
|
```tsx title="geistdocs.tsx"
|
|
@@ -1195,7 +1202,9 @@ related:
|
|
|
1195
1202
|
|
|
1196
1203
|
Geistdocs supports MDX, a superset of Markdown that allows you to use JSX components within your documentation. This guide covers all the formatting options available.
|
|
1197
1204
|
|
|
1198
|
-
Help me write a Geistdocs MDX page. Use this page as a syntax reference and
|
|
1205
|
+
Help me write a Geistdocs MDX page. Use this page as a syntax reference and
|
|
1206
|
+
create an example page with frontmatter, headings, links, a code block, a
|
|
1207
|
+
`Callout`, and a `CopyPrompt` component.
|
|
1199
1208
|
|
|
1200
1209
|
## Frontmatter
|
|
1201
1210
|
|
|
@@ -1247,11 +1256,17 @@ Headings automatically generate anchor links for navigation and deep linking.
|
|
|
1247
1256
|
|
|
1248
1257
|
Create unordered lists with `-`, `*`, or `+`:
|
|
1249
1258
|
|
|
1250
|
-
|
|
1251
|
-
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1259
|
+
```md
|
|
1260
|
+
- Install the required packages
|
|
1261
|
+
- Configure your project
|
|
1262
|
+
- Start the development server
|
|
1263
|
+
```
|
|
1264
|
+
|
|
1265
|
+
This renders as:
|
|
1266
|
+
|
|
1267
|
+
- Install the required packages
|
|
1268
|
+
- Configure your project
|
|
1269
|
+
- Start the development server
|
|
1255
1270
|
|
|
1256
1271
|
Create ordered lists with numbers:
|
|
1257
1272
|
|
|
@@ -1263,7 +1278,19 @@ Create ordered lists with numbers:
|
|
|
1263
1278
|
|
|
1264
1279
|
Use `>` to create blockquotes:
|
|
1265
1280
|
|
|
1266
|
-
>
|
|
1281
|
+
> **Watch:** Learn more about how to use `next/image` → [YouTube (9 minutes)](https://youtu.be/IU_qq_c_lKA).
|
|
1282
|
+
|
|
1283
|
+
### Callouts
|
|
1284
|
+
|
|
1285
|
+
Use `<Callout>` for a highlighted informational note:
|
|
1286
|
+
|
|
1287
|
+
```mdx
|
|
1288
|
+
<Callout>This is automatically set when deploying to Vercel.</Callout>
|
|
1289
|
+
```
|
|
1290
|
+
|
|
1291
|
+
This renders as:
|
|
1292
|
+
|
|
1293
|
+
> This is automatically set when deploying to Vercel.
|
|
1267
1294
|
|
|
1268
1295
|
### Links
|
|
1269
1296
|
|
|
@@ -1272,6 +1299,15 @@ Create links with `[text](url)`:
|
|
|
1272
1299
|
- [External link](https://vercel.com)
|
|
1273
1300
|
- [Internal link](/docs/getting-started)
|
|
1274
1301
|
|
|
1302
|
+
Use an absolute `https://` or `http://` URL to mark a link as external. External
|
|
1303
|
+
links open outside the docs site and display an arrow icon. Use a root-relative
|
|
1304
|
+
path beginning with `/` for internal links:
|
|
1305
|
+
|
|
1306
|
+
```md
|
|
1307
|
+
[External link](https://vercel.com)
|
|
1308
|
+
[Internal link](/docs/getting-started)
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1275
1311
|
### Images
|
|
1276
1312
|
|
|
1277
1313
|
Add images with ``:
|
|
@@ -1376,6 +1412,78 @@ export const Button = ({ children }) => {
|
|
|
1376
1412
|
};
|
|
1377
1413
|
```
|
|
1378
1414
|
|
|
1415
|
+
### Tabs and switchers
|
|
1416
|
+
|
|
1417
|
+
Use consecutive fences with `tab` metadata for code tabs that expose every
|
|
1418
|
+
option at once:
|
|
1419
|
+
|
|
1420
|
+
````md
|
|
1421
|
+
```ts tab="TypeScript" title="example.ts"
|
|
1422
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1423
|
+
```
|
|
1424
|
+
|
|
1425
|
+
```js tab="JavaScript" title="example.js"
|
|
1426
|
+
export const greeting = "Hello from JavaScript";
|
|
1427
|
+
```
|
|
1428
|
+
````
|
|
1429
|
+
|
|
1430
|
+
This renders as:
|
|
1431
|
+
|
|
1432
|
+
```ts tab="TypeScript" title="example.ts"
|
|
1433
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1434
|
+
```
|
|
1435
|
+
|
|
1436
|
+
```js tab="JavaScript" title="example.js"
|
|
1437
|
+
export const greeting = "Hello from JavaScript";
|
|
1438
|
+
```
|
|
1439
|
+
|
|
1440
|
+
Wrap the same fences in `<CodeBlockTabs compact>` to move the selector into the
|
|
1441
|
+
code-block header:
|
|
1442
|
+
|
|
1443
|
+
````mdx
|
|
1444
|
+
<CompactCodeBlockTabs defaultValue="TypeScript">
|
|
1445
|
+
<CodeBlockTabsList>
|
|
1446
|
+
<CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
|
|
1447
|
+
<CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
|
|
1448
|
+
</CodeBlockTabsList>
|
|
1449
|
+
<CodeBlockTab value="TypeScript">
|
|
1450
|
+
```ts title="example.ts"
|
|
1451
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1452
|
+
```
|
|
1453
|
+
</CodeBlockTab>
|
|
1454
|
+
<CodeBlockTab value="JavaScript">
|
|
1455
|
+
```js title="example.js"
|
|
1456
|
+
export const greeting = "Hello from JavaScript";
|
|
1457
|
+
```
|
|
1458
|
+
</CodeBlockTab>
|
|
1459
|
+
</CompactCodeBlockTabs>
|
|
1460
|
+
````
|
|
1461
|
+
|
|
1462
|
+
This renders as:
|
|
1463
|
+
|
|
1464
|
+
<CompactCodeBlockTabs defaultValue="TypeScript">
|
|
1465
|
+
<CodeBlockTabsList>
|
|
1466
|
+
<CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
|
|
1467
|
+
<CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
|
|
1468
|
+
</CodeBlockTabsList>
|
|
1469
|
+
<CodeBlockTab value="TypeScript">
|
|
1470
|
+
```ts title="example.ts"
|
|
1471
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1472
|
+
```
|
|
1473
|
+
</CodeBlockTab>
|
|
1474
|
+
<CodeBlockTab value="JavaScript">
|
|
1475
|
+
```js title="example.js"
|
|
1476
|
+
export const greeting = "Hello from JavaScript";
|
|
1477
|
+
```
|
|
1478
|
+
</CodeBlockTab>
|
|
1479
|
+
</CompactCodeBlockTabs>
|
|
1480
|
+
|
|
1481
|
+
When migrating an existing site such as next-site, translate adjacent
|
|
1482
|
+
`switcher` fences to `tab="TypeScript"` and `tab="JavaScript"`, then wrap the
|
|
1483
|
+
pair with `<CodeBlockTabs compact>`. Import `@vercel/geistdocs/styles.css` (or
|
|
1484
|
+
`theme.css` with the documented Geist dependencies) so Tailwind scans the
|
|
1485
|
+
package's compiled components and emits the tab layout utilities.
|
|
1486
|
+
|
|
1379
1487
|
### Framework icons
|
|
1380
1488
|
|
|
1381
1489
|
Append `#<framework>` to the title to show a framework logo instead of the
|
|
@@ -1384,22 +1492,22 @@ values are `#next` / `#nextjs` and `#svelte` / `#sveltekit`:
|
|
|
1384
1492
|
|
|
1385
1493
|
````md
|
|
1386
1494
|
```ts title="flags.ts#next"
|
|
1387
|
-
import { flag } from
|
|
1495
|
+
import { flag } from "flags/next";
|
|
1388
1496
|
```
|
|
1389
1497
|
|
|
1390
1498
|
```ts title="flags.ts#svelte"
|
|
1391
|
-
import { flag } from
|
|
1499
|
+
import { flag } from "flags/sveltekit";
|
|
1392
1500
|
```
|
|
1393
1501
|
````
|
|
1394
1502
|
|
|
1395
1503
|
This renders as:
|
|
1396
1504
|
|
|
1397
1505
|
```ts title="flags.ts#next"
|
|
1398
|
-
import { flag } from
|
|
1506
|
+
import { flag } from "flags/next";
|
|
1399
1507
|
```
|
|
1400
1508
|
|
|
1401
1509
|
```ts title="flags.ts#svelte"
|
|
1402
|
-
import { flag } from
|
|
1510
|
+
import { flag } from "flags/sveltekit";
|
|
1403
1511
|
```
|
|
1404
1512
|
|
|
1405
1513
|
### Line Numbers
|
|
@@ -1888,7 +1996,7 @@ Each version can define an `icon` to override the default current/previous versi
|
|
|
1888
1996
|
Use `GeistdocsRouteSelect` for framework, product, or route switchers that should not use version-specific labels:
|
|
1889
1997
|
|
|
1890
1998
|
```tsx
|
|
1891
|
-
import {
|
|
1999
|
+
import { LogoIconNextSvg, LogoSvelte } from "@vercel/geistcn-assets/logos";
|
|
1892
2000
|
import { GeistdocsRouteSelect } from "@vercel/geistdocs/versions";
|
|
1893
2001
|
|
|
1894
2002
|
<GeistdocsRouteSelect
|
|
@@ -1899,14 +2007,14 @@ import { GeistdocsRouteSelect } from "@vercel/geistdocs/versions";
|
|
|
1899
2007
|
id: "nextjs",
|
|
1900
2008
|
label: "Next.js",
|
|
1901
2009
|
description: "React framework",
|
|
1902
|
-
icon: <
|
|
2010
|
+
icon: <LogoIconNextSvg size={18} />,
|
|
1903
2011
|
href: "/:path*",
|
|
1904
2012
|
},
|
|
1905
2013
|
{
|
|
1906
2014
|
id: "sveltekit",
|
|
1907
2015
|
label: "SvelteKit",
|
|
1908
2016
|
description: "Svelte framework",
|
|
1909
|
-
icon: <
|
|
2017
|
+
icon: <LogoSvelte height={18} />,
|
|
1910
2018
|
routePrefix: "/sveltekit",
|
|
1911
2019
|
href: "/sveltekit/:path*",
|
|
1912
2020
|
},
|
|
@@ -2012,7 +2120,7 @@ Each public route family needs a matching markdown route in `proxy.ts`. Read [Pr
|
|
|
2012
2120
|
title: Proxy and markdown routes
|
|
2013
2121
|
description: Add custom request logic while keeping Geistdocs markdown negotiation in the package
|
|
2014
2122
|
type: reference
|
|
2015
|
-
summary: Configure createProxy with
|
|
2123
|
+
summary: Configure createProxy with generated route discovery, request hooks, markdown mappings, and a static Next.js matcher.
|
|
2016
2124
|
url: /docs/proxy
|
|
2017
2125
|
source: apps/template/content/docs/proxy.mdx
|
|
2018
2126
|
prerequisites:
|
|
@@ -2189,6 +2297,25 @@ export const config = {
|
|
|
2189
2297
|
|
|
2190
2298
|
The package keeps `llms.txt`, `sitemap.md`, `agents.md`, MCP discovery, and RSS out of root page-Markdown negotiation. Continue to exclude site-specific application and API routes with the matcher or a `before` hook. A root Markdown page is exposed as `/index.md`, or `<basePath>/index.md` publicly.
|
|
2191
2299
|
|
|
2300
|
+
## Recover unmatched Markdown requests
|
|
2301
|
+
|
|
2302
|
+
`createGeistdocs` in `next.config.ts` generates a lightweight manifest from App Router pages and route handlers. When `agent` is enabled, `createProxy` uses this manifest to return a Markdown 404 only when a `GET` or `HEAD` request matches neither a Markdown mapping nor an application route.
|
|
2303
|
+
|
|
2304
|
+
The manifest contains route patterns, not page modules or content. Static, dynamic, catch-all, optional catch-all, grouped, and localized routes continue to Next.js. Root catch-all pages are treated as potentially valid, so the app remains responsible for their 404 behavior. The package's own `[...not-found]` route handler is excluded so it does not claim every path.
|
|
2305
|
+
|
|
2306
|
+
The integration also resolves `next.config.ts` rewrites. Static rewrite sources are matched exactly, while parameterized sources protect their safe static prefix. If a rewrite begins with a dynamic root segment, Geistdocs disables automatic recovery rather than risk returning a Markdown 404 for a real rewritten route.
|
|
2307
|
+
|
|
2308
|
+
No proxy option is required. Pass `markdownNotFound: false` only when the site needs to disable automatic recovery:
|
|
2309
|
+
|
|
2310
|
+
```ts title="proxy.ts"
|
|
2311
|
+
const proxy = createProxy({
|
|
2312
|
+
config: geistdocsConfig,
|
|
2313
|
+
markdownNotFound: false,
|
|
2314
|
+
});
|
|
2315
|
+
```
|
|
2316
|
+
|
|
2317
|
+
Existing sites that use `createMDX` directly do not receive a generated manifest and keep the previous opt-in behavior. Restart `next dev` after adding, deleting, or renaming a route; production builds always regenerate the manifest.
|
|
2318
|
+
|
|
2192
2319
|
## Hook context
|
|
2193
2320
|
|
|
2194
2321
|
Both `before` and `after` receive the same context:
|
|
@@ -2282,7 +2409,6 @@ import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
|
2282
2409
|
|
|
2283
2410
|
export const { GET, generateStaticParams } =
|
|
2284
2411
|
createDocsMarkdownRoute({
|
|
2285
|
-
notFound: {},
|
|
2286
2412
|
sources: [geistdocsSource],
|
|
2287
2413
|
});
|
|
2288
2414
|
```
|
|
@@ -2306,7 +2432,7 @@ When a Markdown request does not match a page, Geistdocs returns an agent-readab
|
|
|
2306
2432
|
|
|
2307
2433
|
For example, a request for `/docs/env-vars` can suggest `/docs/environment-variables.md`. The response uses a short cache lifetime and returns a real `404` status. It also sends `X-Robots-Tag: noindex` and no canonical link because the requested page does not exist. Regular HTML requests keep the app's standard not-found behavior.
|
|
2308
2434
|
|
|
2309
|
-
|
|
2435
|
+
The suggestion response is enabled by default. Pass `notFound: { status: 410 }` for permanently removed pages, or `notFound: false` to use the standard Next.js not-found response. Legacy `status: 200` values are treated as `404` so missing pages always return a real error status.
|
|
2310
2436
|
|
|
2311
2437
|
If a custom `markdownRoutes` mapping changes the public path shape, set `notFound.getRequestedPath` to reconstruct the app-local public pathname. This also keeps page lookup and suggestions within the right source when a flattened route serves multiple sources:
|
|
2312
2438
|
|
|
@@ -2323,17 +2449,21 @@ Set `notFound.getPageMarkdownUrl` as well when suggested pages use a custom app-
|
|
|
2323
2449
|
|
|
2324
2450
|
### Unmatched application paths
|
|
2325
2451
|
|
|
2326
|
-
|
|
2452
|
+
When `agent` is enabled, `createGeistdocs` scans App Router pages and route handlers during `next dev` and `next build`. `createProxy` uses that generated manifest to distinguish valid application routes from unknown paths. Valid routes continue to the app's HTML or route-handler response. Unknown Markdown or detected-agent `GET` and `HEAD` requests receive a concise 404 with links to the docs, `sitemap.md`, and `llms.txt`.
|
|
2327
2453
|
|
|
2328
|
-
|
|
2454
|
+
Markdown mappings take precedence over generated app routes, so a route that has both HTML and Markdown continues to negotiate Markdown. Dynamic app routes are treated as potentially valid; the app remains responsible for returning its own 404 when a specific slug does not exist.
|
|
2455
|
+
|
|
2456
|
+
Pass `markdownNotFound: false` to disable automatic unmatched-path recovery:
|
|
2329
2457
|
|
|
2330
2458
|
```ts title="proxy.ts"
|
|
2331
2459
|
const proxy = createProxy({
|
|
2332
2460
|
config: geistdocsConfig,
|
|
2333
|
-
markdownNotFound:
|
|
2461
|
+
markdownNotFound: false,
|
|
2334
2462
|
});
|
|
2335
2463
|
```
|
|
2336
2464
|
|
|
2465
|
+
Sites that do not use `createGeistdocs` keep the previous opt-in behavior. Existing boolean and predicate forms remain supported for compatibility.
|
|
2466
|
+
|
|
2337
2467
|
`createNotFoundRoute` remains available for apps that prefer an explicit catch-all Route Handler with Geistdocs' minimal HTML response.
|
|
2338
2468
|
|
|
2339
2469
|
|
|
@@ -3575,66 +3705,3 @@ On mobile, Geistdocs replaces the sidebar outline with a compact menu in the pag
|
|
|
3575
3705
|
|
|
3576
3706
|
Keep headings short and descriptive so the outline reads like a summary of the page. Name each heading after the goal of its section, and avoid stacking two headings with no content between them.
|
|
3577
3707
|
|
|
3578
|
-
|
|
3579
|
-
---
|
|
3580
|
-
|
|
3581
|
-
---
|
|
3582
|
-
title: Theme-Aware Image
|
|
3583
|
-
description: Display different images based on the user's light or dark theme preference
|
|
3584
|
-
type: reference
|
|
3585
|
-
summary: A component that swaps images based on the active theme, built on top of Next.js Image.
|
|
3586
|
-
url: /docs/theme-aware-image
|
|
3587
|
-
source: apps/template/content/docs/theme-aware-image.mdx
|
|
3588
|
-
prerequisites:
|
|
3589
|
-
- /docs/getting-started
|
|
3590
|
-
- /docs/provider
|
|
3591
|
-
related:
|
|
3592
|
-
- /docs/syntax
|
|
3593
|
-
- /docs/configuration
|
|
3594
|
-
---
|
|
3595
|
-
|
|
3596
|
-
# Theme-Aware Image
|
|
3597
|
-
|
|
3598
|
-
The `ThemeAwareImage` component renders different images depending on whether the user is viewing your documentation in light or dark mode. It extends the Next.js `Image` component, so you get all the same optimization benefits like lazy loading, responsive sizing, and format conversion.
|
|
3599
|
-
|
|
3600
|
-
Help me add a theme-aware image to a Geistdocs MDX page. Create a usage example with light and dark image sources, alt text, width, and height, then explain where to place the image files.
|
|
3601
|
-
|
|
3602
|
-
## Usage
|
|
3603
|
-
|
|
3604
|
-
Import the component and pass a `src` object with `light` and `dark` variants:
|
|
3605
|
-
|
|
3606
|
-
```tsx
|
|
3607
|
-
import { ThemeAwareImage } from "@vercel/geistdocs/components/theme-aware-image";
|
|
3608
|
-
|
|
3609
|
-
<ThemeAwareImage
|
|
3610
|
-
src={{
|
|
3611
|
-
light: "/images/diagram-light.png",
|
|
3612
|
-
dark: "/images/diagram-dark.png",
|
|
3613
|
-
}}
|
|
3614
|
-
alt="Architecture diagram"
|
|
3615
|
-
width={800}
|
|
3616
|
-
height={400}
|
|
3617
|
-
/>
|
|
3618
|
-
```
|
|
3619
|
-
|
|
3620
|
-
The component reads the current theme from `next-themes` and resolves the correct image source automatically. All standard Next.js `Image` props (such as `width`, `height`, `alt`, `priority`, and `className`) are supported.
|
|
3621
|
-
|
|
3622
|
-
## How it works
|
|
3623
|
-
|
|
3624
|
-
`ThemeAwareImage` uses the `resolvedTheme` value from the `useTheme` hook provided by `next-themes`. This ensures it responds to the actual rendered theme, even when the user's preference is set to "system".
|
|
3625
|
-
|
|
3626
|
-
- When `resolvedTheme` is `"dark"`, the `src.dark` image is displayed.
|
|
3627
|
-
- Otherwise, the `src.light` image is used.
|
|
3628
|
-
|
|
3629
|
-
Because this component relies on client-side theme detection, it is a client component (`"use client"`).
|
|
3630
|
-
|
|
3631
|
-
## Props
|
|
3632
|
-
|
|
3633
|
-
| Prop | Type | Description |
|
|
3634
|
-
| --- | --- | --- |
|
|
3635
|
-
| `src` | `{ light: ImageProps["src"]; dark: ImageProps["src"] }` | An object containing the light and dark image sources |
|
|
3636
|
-
| `alt` | `string` | Accessible alt text for the image |
|
|
3637
|
-
| `width` | `number` | The width of the image in pixels |
|
|
3638
|
-
| `height` | `number` | The height of the image in pixels |
|
|
3639
|
-
| `...rest` | `ImageProps` | Any additional props supported by the Next.js `Image` component |
|
|
3640
|
-
|
package/docs/manifest.json
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"description": "Add custom request logic while keeping Geistdocs markdown negotiation in the package",
|
|
94
94
|
"path": "pages/proxy.md",
|
|
95
95
|
"source": "apps/template/content/docs/proxy.mdx",
|
|
96
|
-
"summary": "Configure createProxy with
|
|
96
|
+
"summary": "Configure createProxy with generated route discovery, request hooks, markdown mappings, and a static Next.js matcher.",
|
|
97
97
|
"title": "Proxy and markdown routes",
|
|
98
98
|
"type": "reference",
|
|
99
99
|
"url": "/docs/proxy"
|
|
@@ -196,17 +196,8 @@
|
|
|
196
196
|
"title": "Table of contents",
|
|
197
197
|
"type": "reference",
|
|
198
198
|
"url": "/docs/table-of-contents"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"description": "Display different images based on the user's light or dark theme preference",
|
|
202
|
-
"path": "pages/theme-aware-image.md",
|
|
203
|
-
"source": "apps/template/content/docs/theme-aware-image.mdx",
|
|
204
|
-
"summary": "A component that swaps images based on the active theme, built on top of Next.js Image.",
|
|
205
|
-
"title": "Theme-Aware Image",
|
|
206
|
-
"type": "reference",
|
|
207
|
-
"url": "/docs/theme-aware-image"
|
|
208
199
|
}
|
|
209
200
|
],
|
|
210
201
|
"source": "apps/template/content/docs",
|
|
211
|
-
"version": "1.
|
|
202
|
+
"version": "1.25.1-canary.5684bb5"
|
|
212
203
|
}
|
|
@@ -27,6 +27,7 @@ Configure Geistdocs through user-owned files in the generated project. Runtime f
|
|
|
27
27
|
| File | Purpose |
|
|
28
28
|
| --- | --- |
|
|
29
29
|
| `geistdocs.tsx` | Site-level settings, including logo, nav, GitHub repo, AI prompt, agent-readiness metadata, translations, and feature flags. |
|
|
30
|
+
| `next.config.ts` | Composes Fumadocs MDX, discovers App Router routes, and configures Next.js. |
|
|
30
31
|
| `source.config.ts` | Configures Fumadocs collections with the package-provided schema, Markdown plugins, and syntax theme. |
|
|
31
32
|
| `lib/geistdocs/config.tsx` | Converts `geistdocs.tsx` exports into the package config using `defineConfig`. |
|
|
32
33
|
| `source.config.ts` | Configures Fumadocs collections with package-safe schemas and Markdown processing. |
|
|
@@ -216,11 +217,18 @@ To serve docs from the site root, use `route: "/"` in `content` and `baseUrl: "/
|
|
|
216
217
|
When Next.js mounts the application below a path, set the same value in `next.config.ts` and Geistdocs config:
|
|
217
218
|
|
|
218
219
|
```ts title="next.config.ts"
|
|
220
|
+
import { createGeistdocs } from "@vercel/geistdocs/next";
|
|
221
|
+
import type { NextConfig } from "next";
|
|
222
|
+
|
|
223
|
+
const withGeistdocs = createGeistdocs();
|
|
224
|
+
|
|
219
225
|
const config: NextConfig = {
|
|
220
226
|
basePath: "/docs",
|
|
221
227
|
cacheComponents: true,
|
|
222
228
|
partialPrefetching: true,
|
|
223
229
|
};
|
|
230
|
+
|
|
231
|
+
export default withGeistdocs(config);
|
|
224
232
|
```
|
|
225
233
|
|
|
226
234
|
```tsx title="geistdocs.tsx"
|
package/docs/pages/md.md
CHANGED
|
@@ -71,7 +71,6 @@ import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
|
71
71
|
|
|
72
72
|
export const { GET, generateStaticParams } =
|
|
73
73
|
createDocsMarkdownRoute({
|
|
74
|
-
notFound: {},
|
|
75
74
|
sources: [geistdocsSource],
|
|
76
75
|
});
|
|
77
76
|
```
|
|
@@ -95,7 +94,7 @@ When a Markdown request does not match a page, Geistdocs returns an agent-readab
|
|
|
95
94
|
|
|
96
95
|
For example, a request for `/docs/env-vars` can suggest `/docs/environment-variables.md`. The response uses a short cache lifetime and returns a real `404` status. It also sends `X-Robots-Tag: noindex` and no canonical link because the requested page does not exist. Regular HTML requests keep the app's standard not-found behavior.
|
|
97
96
|
|
|
98
|
-
|
|
97
|
+
The suggestion response is enabled by default. Pass `notFound: { status: 410 }` for permanently removed pages, or `notFound: false` to use the standard Next.js not-found response. Legacy `status: 200` values are treated as `404` so missing pages always return a real error status.
|
|
99
98
|
|
|
100
99
|
If a custom `markdownRoutes` mapping changes the public path shape, set `notFound.getRequestedPath` to reconstruct the app-local public pathname. This also keeps page lookup and suggestions within the right source when a flattened route serves multiple sources:
|
|
101
100
|
|
|
@@ -112,15 +111,19 @@ Set `notFound.getPageMarkdownUrl` as well when suggested pages use a custom app-
|
|
|
112
111
|
|
|
113
112
|
### Unmatched application paths
|
|
114
113
|
|
|
115
|
-
|
|
114
|
+
When `agent` is enabled, `createGeistdocs` scans App Router pages and route handlers during `next dev` and `next build`. `createProxy` uses that generated manifest to distinguish valid application routes from unknown paths. Valid routes continue to the app's HTML or route-handler response. Unknown Markdown or detected-agent `GET` and `HEAD` requests receive a concise 404 with links to the docs, `sitemap.md`, and `llms.txt`.
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
Markdown mappings take precedence over generated app routes, so a route that has both HTML and Markdown continues to negotiate Markdown. Dynamic app routes are treated as potentially valid; the app remains responsible for returning its own 404 when a specific slug does not exist.
|
|
117
|
+
|
|
118
|
+
Pass `markdownNotFound: false` to disable automatic unmatched-path recovery:
|
|
118
119
|
|
|
119
120
|
```ts title="proxy.ts"
|
|
120
121
|
const proxy = createProxy({
|
|
121
122
|
config: geistdocsConfig,
|
|
122
|
-
markdownNotFound:
|
|
123
|
+
markdownNotFound: false,
|
|
123
124
|
});
|
|
124
125
|
```
|
|
125
126
|
|
|
127
|
+
Sites that do not use `createGeistdocs` keep the previous opt-in behavior. Existing boolean and predicate forms remain supported for compatibility.
|
|
128
|
+
|
|
126
129
|
`createNotFoundRoute` remains available for apps that prefer an explicit catch-all Route Handler with Geistdocs' minimal HTML response.
|
package/docs/pages/migration.md
CHANGED
|
@@ -44,7 +44,7 @@ Fix unrelated build failures first. A migration is safer when the starting point
|
|
|
44
44
|
|
|
45
45
|
## Install Geistdocs
|
|
46
46
|
|
|
47
|
-
Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting.
|
|
47
|
+
Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting. Geistdocs requires Next.js 16.3.3 or later within 16.x. Earlier 16.3 releases can retain an optional catch-all route's index content after a client navigation to a child page when Cache Components and Partial Prefetching are enabled.
|
|
48
48
|
|
|
49
49
|
For an existing project, use your package manager directly:
|
|
50
50
|
|
|
@@ -58,24 +58,26 @@ If you are starting from a generated Geistdocs project and moving content into i
|
|
|
58
58
|
pnpm dlx @vercel/geistdocs init --name my-docs
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
##
|
|
61
|
+
## Configure Next.js
|
|
62
62
|
|
|
63
|
-
Geistdocs
|
|
63
|
+
The Geistdocs Next.js integration composes Fumadocs MDX, enables automatic app-route discovery for agent-readable 404s, and preserves your Next.js configuration. Enable Cache Components in the same file:
|
|
64
64
|
|
|
65
65
|
```ts title="next.config.ts"
|
|
66
|
-
import {
|
|
66
|
+
import { createGeistdocs } from "@vercel/geistdocs/next";
|
|
67
67
|
import type { NextConfig } from "next";
|
|
68
68
|
|
|
69
|
-
const
|
|
69
|
+
const withGeistdocs = createGeistdocs();
|
|
70
70
|
|
|
71
71
|
const config: NextConfig = {
|
|
72
72
|
cacheComponents: true,
|
|
73
73
|
partialPrefetching: true,
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
export default
|
|
76
|
+
export default withGeistdocs(config);
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
Restart `next dev` after adding, deleting, or renaming an App Router page or route. Production builds always regenerate the route manifest.
|
|
80
|
+
|
|
79
81
|
Every root dynamic parameter needs at least one value from `generateStaticParams`. For a site with a `[lang]` root segment, return every configured language from the root layout:
|
|
80
82
|
|
|
81
83
|
```tsx title="app/[lang]/layout.tsx"
|
|
@@ -375,16 +377,14 @@ For a base-path application whose root page is documentation, add `"/"` to the s
|
|
|
375
377
|
Tailwind CSS v4 requires `@source` entries for package components and related dependencies.
|
|
376
378
|
|
|
377
379
|
```css title="app/styles/geistdocs.css"
|
|
378
|
-
@import "
|
|
380
|
+
@import "@vercel/geistcn/tailwind.css";
|
|
381
|
+
@import "@vercel/geistcn/styles.css";
|
|
379
382
|
@import "fumadocs-ui/css/shadcn.css";
|
|
380
383
|
@import "fumadocs-ui/css/preset.css";
|
|
381
|
-
@import "
|
|
382
|
-
|
|
383
|
-
@source "../../node_modules/@vercel/geistdocs/dist/**/*.js";
|
|
384
|
-
@source "../../node_modules/streamdown/dist/*.js";
|
|
384
|
+
@import "@vercel/geistdocs/theme.css";
|
|
385
385
|
```
|
|
386
386
|
|
|
387
|
-
|
|
387
|
+
Geistcn owns the Geist tokens, theme, typography, preflight, and animation utilities. The Geistdocs theme entry point remains during the compatibility migration for documentation and Fumadocs integration rules and to source the compiled runtime dependencies.
|
|
388
388
|
|
|
389
389
|
## Handle environment variables
|
|
390
390
|
|
package/docs/pages/proxy.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: Proxy and markdown routes
|
|
3
3
|
description: Add custom request logic while keeping Geistdocs markdown negotiation in the package
|
|
4
4
|
type: reference
|
|
5
|
-
summary: Configure createProxy with
|
|
5
|
+
summary: Configure createProxy with generated route discovery, request hooks, markdown mappings, and a static Next.js matcher.
|
|
6
6
|
url: /docs/proxy
|
|
7
7
|
source: apps/template/content/docs/proxy.mdx
|
|
8
8
|
prerequisites:
|
|
@@ -179,6 +179,25 @@ export const config = {
|
|
|
179
179
|
|
|
180
180
|
The package keeps `llms.txt`, `sitemap.md`, `agents.md`, MCP discovery, and RSS out of root page-Markdown negotiation. Continue to exclude site-specific application and API routes with the matcher or a `before` hook. A root Markdown page is exposed as `/index.md`, or `<basePath>/index.md` publicly.
|
|
181
181
|
|
|
182
|
+
## Recover unmatched Markdown requests
|
|
183
|
+
|
|
184
|
+
`createGeistdocs` in `next.config.ts` generates a lightweight manifest from App Router pages and route handlers. When `agent` is enabled, `createProxy` uses this manifest to return a Markdown 404 only when a `GET` or `HEAD` request matches neither a Markdown mapping nor an application route.
|
|
185
|
+
|
|
186
|
+
The manifest contains route patterns, not page modules or content. Static, dynamic, catch-all, optional catch-all, grouped, and localized routes continue to Next.js. Root catch-all pages are treated as potentially valid, so the app remains responsible for their 404 behavior. The package's own `[...not-found]` route handler is excluded so it does not claim every path.
|
|
187
|
+
|
|
188
|
+
The integration also resolves `next.config.ts` rewrites. Static rewrite sources are matched exactly, while parameterized sources protect their safe static prefix. If a rewrite begins with a dynamic root segment, Geistdocs disables automatic recovery rather than risk returning a Markdown 404 for a real rewritten route.
|
|
189
|
+
|
|
190
|
+
No proxy option is required. Pass `markdownNotFound: false` only when the site needs to disable automatic recovery:
|
|
191
|
+
|
|
192
|
+
```ts title="proxy.ts"
|
|
193
|
+
const proxy = createProxy({
|
|
194
|
+
config: geistdocsConfig,
|
|
195
|
+
markdownNotFound: false,
|
|
196
|
+
});
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Existing sites that use `createMDX` directly do not receive a generated manifest and keep the previous opt-in behavior. Restart `next dev` after adding, deleting, or renaming a route; production builds always regenerate the manifest.
|
|
200
|
+
|
|
182
201
|
## Hook context
|
|
183
202
|
|
|
184
203
|
Both `before` and `after` receive the same context:
|