@vercel/geistdocs 1.25.0 → 1.25.1-canary.498144e
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 +30 -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 +18 -25
- package/dist/components/copy-prompt.d.ts +2 -1
- package/dist/components/copy-prompt.d.ts.map +1 -1
- package/dist/components/copy-prompt.js +5 -5
- package/dist/components/heading.d.ts +7 -0
- package/dist/components/heading.d.ts.map +1 -0
- package/dist/components/heading.js +14 -0
- package/dist/components/image.d.ts +19 -0
- package/dist/components/image.d.ts.map +1 -0
- package/dist/components/image.js +9 -0
- package/dist/components/mermaid.js +1 -1
- package/dist/components/table.d.ts +3 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +3 -0
- package/dist/controls.d.ts +8 -4
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +16 -15
- package/dist/footer.d.ts.map +1 -1
- package/dist/footer.js +6 -6
- package/dist/home-layout.js +1 -1
- package/dist/internal/chat/activity.d.ts +20 -0
- package/dist/internal/chat/activity.d.ts.map +1 -0
- package/dist/internal/chat/activity.js +43 -0
- package/dist/internal/chat/context.d.ts +2 -0
- package/dist/internal/chat/context.d.ts.map +1 -1
- package/dist/internal/chat/context.js +24 -3
- 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 +21 -0
- package/dist/internal/chat/loading-skeleton.d.ts +7 -0
- package/dist/internal/chat/loading-skeleton.d.ts.map +1 -0
- package/dist/internal/chat/loading-skeleton.js +46 -0
- package/dist/internal/chat/message-metadata.d.ts.map +1 -1
- package/dist/internal/chat/message-metadata.js +18 -32
- package/dist/internal/chat/message-sources.d.ts +3 -0
- package/dist/internal/chat/message-sources.d.ts.map +1 -0
- package/dist/internal/chat/message-sources.js +23 -0
- package/dist/internal/chat/message.d.ts.map +1 -1
- package/dist/internal/chat/message.js +62 -8
- 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 +41 -33
- package/dist/internal/chat/source-chunks.d.ts +9 -0
- package/dist/internal/chat/source-chunks.d.ts.map +1 -0
- package/dist/internal/chat/source-chunks.js +7 -0
- package/dist/internal/chat/sources.d.ts +4 -2
- package/dist/internal/chat/sources.d.ts.map +1 -1
- package/dist/internal/chat/sources.js +12 -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/link-href.d.ts +13 -0
- package/dist/internal/link-href.d.ts.map +1 -0
- package/dist/internal/link-href.js +51 -0
- package/dist/internal/mousedown-navigation-utils.d.ts +5 -0
- package/dist/internal/mousedown-navigation-utils.d.ts.map +1 -0
- package/dist/internal/mousedown-navigation-utils.js +95 -0
- package/dist/internal/mousedown-navigation.d.ts +10 -0
- package/dist/internal/mousedown-navigation.d.ts.map +1 -0
- package/dist/internal/mousedown-navigation.js +42 -0
- 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 +11 -16
- 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 +3 -2
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +52 -49
- 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 +36 -12
- package/dist/internal/search.d.ts.map +1 -1
- package/dist/internal/search.js +2 -2
- package/dist/internal/sidebar-responsive.d.ts +0 -1
- package/dist/internal/sidebar-responsive.d.ts.map +1 -1
- package/dist/internal/sidebar-responsive.js +0 -9
- package/dist/internal/sidebar-tree.d.ts.map +1 -1
- package/dist/internal/sidebar-tree.js +14 -7
- package/dist/internal/sidebar.d.ts.map +1 -1
- package/dist/internal/sidebar.js +80 -53
- package/dist/internal/table-of-contents.d.ts.map +1 -1
- package/dist/internal/table-of-contents.js +1 -1
- package/dist/internal/toc-items.d.ts.map +1 -1
- package/dist/internal/toc-items.js +17 -7
- package/dist/internal/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/internal/ui/dropdown-menu.js +8 -8
- package/dist/internal/ui/navigation-menu.d.ts.map +1 -1
- package/dist/internal/ui/navigation-menu.js +4 -4
- 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/internal/use-mobile.d.ts.map +1 -1
- package/dist/internal/use-mobile.js +2 -12
- package/dist/layout.d.ts +1 -0
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +3 -1
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +17 -2
- 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/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +18 -5
- package/dist/routes/chat.d.ts +1 -1
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +31 -14
- package/dist/routes/llms.d.ts +1 -1
- package/dist/routes/llms.d.ts.map +1 -1
- package/dist/routes/llms.js +12 -2
- package/dist/source.d.ts +6 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +1 -2
- package/dist/versions.d.ts.map +1 -1
- package/dist/versions.js +5 -5
- package/docs/agents.md +4 -4
- package/docs/llms.txt +441 -111
- package/docs/manifest.json +12 -12
- package/docs/pages/ask-ai.md +2 -2
- package/docs/pages/deployment.md +30 -5
- package/docs/pages/getting-started.md +38 -12
- package/docs/pages/guides/nested-navigation.md +1 -1
- package/docs/pages/md.md +1 -1
- package/docs/pages/migration-2.md +106 -0
- package/docs/pages/migration.md +10 -9
- package/docs/pages/syntax.md +242 -11
- package/docs/pages/versioned-docs.md +3 -3
- package/docs/sitemap.md +3 -3
- package/package.json +15 -103
- package/styles.css +3 -2
- package/template/AGENTS.md +10 -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 +11 -4
- package/template/app/styles/geistdocs.css +18 -15
- package/template/components/ui/button.tsx +1 -1
- package/template/content/docs/ask-ai.cn.mdx +2 -2
- package/template/content/docs/ask-ai.mdx +2 -2
- package/template/content/docs/configuration.cn.mdx +2 -2
- package/template/content/docs/deployment.mdx +31 -6
- package/template/content/docs/getting-started.mdx +39 -13
- package/template/content/docs/guides/nested-navigation.mdx +1 -1
- package/template/content/docs/md.mdx +1 -1
- package/template/content/docs/meta.json +1 -0
- package/template/content/docs/migration-2.mdx +106 -0
- package/template/content/docs/migration.mdx +10 -8
- package/template/content/docs/syntax.mdx +248 -11
- package/template/content/docs/versioned-docs.mdx +3 -3
- package/template/lib/geistdocs/config.tsx +0 -5
- package/template/next.config.ts +25 -2
- package/template/package.json +6 -8
- package/theme.css +39 -699
- 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.25.
|
|
3
|
+
These docs are bundled with `@vercel/geistdocs` 1.25.1-canary.498144e.
|
|
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
|
|
@@ -8,8 +8,9 @@ They describe how to build package-backed Geistdocs sites and how to use the pac
|
|
|
8
8
|
- [Overview](pages/index.md): Geistdocs is a packaged documentation system for creating Next.js and Fumadocs sites with shared runtime features.
|
|
9
9
|
- [Getting Started](pages/getting-started.md): Create a Geistdocs project, run it locally, and edit your first documentation page.
|
|
10
10
|
- [Environment Variables](pages/env.md): Environment variables required by Geistdocs for AI chat, proxy mode, and production URL configuration.
|
|
11
|
-
- [Deploy to Vercel](pages/deployment.md): Deploy
|
|
12
|
-
- [
|
|
11
|
+
- [Deploy to Vercel](pages/deployment.md): Deploy a Geistdocs site to Vercel with the required project settings, environment variables, and private-package access.
|
|
12
|
+
- [Migrate to Geistdocs](pages/migration.md): Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
|
|
13
|
+
- [Migrate from Geistdocs 1.x to 2.0](pages/migration-2.md): A concise, agent-friendly checklist for upgrading an existing Geistdocs 1.x site to 2.0.
|
|
13
14
|
- [Configuration](pages/configuration.md): Configure site metadata, navigation, AI features, page actions, translations, and local adapters.
|
|
14
15
|
- [Syntax](pages/syntax.md): Supported MDX syntax including text formatting, code blocks, line highlighting, and Mermaid diagrams.
|
|
15
16
|
- [Geistdocs Provider](pages/provider.md): The root provider component that wraps your application to handle toast notifications, search, and analytics.
|
|
@@ -26,7 +27,6 @@ They describe how to build package-backed Geistdocs sites and how to use the pac
|
|
|
26
27
|
- [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
28
|
- [RSS](pages/rss.md): An automatically generated RSS 2.0 feed that keeps users informed when documentation is published or updated.
|
|
28
29
|
- [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
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
@@ -149,39 +149,47 @@ related:
|
|
|
149
149
|
|
|
150
150
|
# Getting Started
|
|
151
151
|
|
|
152
|
-
Create a Geistdocs site with the package CLI, then
|
|
152
|
+
Create a new Geistdocs 2.0 site with the package CLI, then customize its identity, content, and navigation. If you already have a documentation site, use [Migrate to Geistdocs](/docs/migration) or [Migrate 1.x → 2.0](/docs/migration-2) instead.
|
|
153
153
|
|
|
154
|
-
Create a Geistdocs project with `pnpm dlx @vercel/geistdocs init --name my-docs`.
|
|
154
|
+
Create a new Geistdocs project with `pnpm dlx @vercel/geistdocs@latest init --name my-docs`. Confirm the prerequisites, run `pnpm dev`, and help me customize `geistdocs.tsx`, `content/docs/index.mdx`, and `content/docs/meta.json`. Keep the generated integrations package-backed.
|
|
155
155
|
|
|
156
156
|
## Prerequisites
|
|
157
157
|
|
|
158
158
|
Before you begin, install:
|
|
159
159
|
|
|
160
|
-
- Node.js
|
|
161
|
-
- pnpm
|
|
160
|
+
- Node.js 20.9 or later
|
|
161
|
+
- pnpm
|
|
162
162
|
- Git
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
The CLI always uses pnpm to install the generated project's dependencies.
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
## Authenticate package access
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
Geistdocs 2.0 depends on restricted `@vercel/geistcn` and `@vercel/geistcn-assets` packages. Configure your user-level `~/.npmrc` before running the CLI:
|
|
169
|
+
|
|
170
|
+
```ini title="~/.npmrc"
|
|
171
|
+
@vercel:registry=https://registry.npmjs.org/
|
|
172
|
+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
|
173
|
+
always-auth=true
|
|
170
174
|
```
|
|
171
175
|
|
|
172
|
-
|
|
176
|
+
Set `NPM_TOKEN` from an approved internal source. Never put the token value in `.npmrc`, an `.env` file, shell history, or Git. See [Deploy to Vercel](/docs/deployment#configure-private-package-access) for automated installs.
|
|
177
|
+
|
|
178
|
+
## Create a project
|
|
179
|
+
|
|
180
|
+
Run the Geistdocs CLI from an empty parent folder:
|
|
173
181
|
|
|
174
182
|
```bash title="Terminal"
|
|
175
|
-
|
|
183
|
+
pnpm dlx @vercel/geistdocs@latest init --name my-docs
|
|
176
184
|
```
|
|
177
185
|
|
|
178
186
|
The CLI copies the template bundled in the package, rewrites the generated app to depend on the same `@vercel/geistdocs` version, installs dependencies, copies `.env.example` to `.env.local`, and initializes Git.
|
|
179
187
|
|
|
180
188
|
## Understand generated dependencies
|
|
181
189
|
|
|
182
|
-
Generated projects
|
|
190
|
+
Generated projects pin the resolved `@vercel/geistdocs` version and include its matching Geistcn dependencies, AI SDK v6, and `@ai-sdk/react` v3. The template already configures styles, fonts, Cache Components, Partial Prefetching, source adapters, search, Ask AI, and agent-readable routes.
|
|
183
191
|
|
|
184
|
-
|
|
192
|
+
Keep those integrations package-backed. Update Geistdocs instead of copying package internals into the app.
|
|
185
193
|
|
|
186
194
|
## Start the development server
|
|
187
195
|
|
|
@@ -194,6 +202,14 @@ pnpm dev
|
|
|
194
202
|
|
|
195
203
|
Open `http://localhost:3000` in your browser.
|
|
196
204
|
|
|
205
|
+
Start with these files:
|
|
206
|
+
|
|
207
|
+
- `geistdocs.tsx` for the site title, logo, navigation, repository, and AI prompt.
|
|
208
|
+
- `content/docs/index.mdx` for the documentation overview.
|
|
209
|
+
- `content/docs/meta.json` for sidebar order and groups.
|
|
210
|
+
|
|
211
|
+
Only customize `components/geistdocs/*`, `lib/geistdocs/*`, or route adapters when the generated defaults do not fit your site.
|
|
212
|
+
|
|
197
213
|
## Edit your first page
|
|
198
214
|
|
|
199
215
|
Docs live in `content/docs`. Edit the overview page:
|
|
@@ -252,6 +268,16 @@ pnpm exec geistdocs update
|
|
|
252
268
|
|
|
253
269
|
Review and test dependency changes before committing.
|
|
254
270
|
|
|
271
|
+
## Verify and deploy
|
|
272
|
+
|
|
273
|
+
Run a production build before publishing:
|
|
274
|
+
|
|
275
|
+
```bash title="Terminal"
|
|
276
|
+
pnpm build
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Then follow [Deploy to Vercel](/docs/deployment), including private package access and environment-variable setup.
|
|
280
|
+
|
|
255
281
|
|
|
256
282
|
---
|
|
257
283
|
|
|
@@ -325,7 +351,7 @@ Set this variable explicitly when deploying outside Vercel. Use a hostname such
|
|
|
325
351
|
title: Deploy to Vercel
|
|
326
352
|
description: Learn how to deploy your Geistdocs site to Vercel
|
|
327
353
|
type: guide
|
|
328
|
-
summary: Deploy
|
|
354
|
+
summary: Deploy a Geistdocs site to Vercel with the required project settings, environment variables, and private-package access.
|
|
329
355
|
url: /docs/deployment
|
|
330
356
|
source: apps/template/content/docs/deployment.mdx
|
|
331
357
|
prerequisites:
|
|
@@ -337,9 +363,9 @@ related:
|
|
|
337
363
|
|
|
338
364
|
# Deploy to Vercel
|
|
339
365
|
|
|
340
|
-
Deploy a Geistdocs site to Vercel as a Next.js app.
|
|
366
|
+
Deploy a Geistdocs site to Vercel as a Next.js app. Configure private package access, environment variables, and the production URL before shipping.
|
|
341
367
|
|
|
342
|
-
Help me deploy this Geistdocs project to Vercel.
|
|
368
|
+
Help me deploy this Geistdocs 2.0 project to Vercel. Verify private npm access for its Geistcn dependencies, then review the package scripts, environment variables, GitHub Actions authentication, and Vercel project settings.
|
|
343
369
|
|
|
344
370
|
## Prerequisites
|
|
345
371
|
|
|
@@ -349,6 +375,31 @@ Before deploying, you need:
|
|
|
349
375
|
- A [Vercel account](https://vercel.com) (sign up at [vercel.com](https://vercel.com))
|
|
350
376
|
- Your Vercel account connected to your GitHub account
|
|
351
377
|
- Environment variables ready (see [Environment Variables](/docs/env))
|
|
378
|
+
- Access to the restricted `@vercel` npm packages
|
|
379
|
+
|
|
380
|
+
## Configure private package access
|
|
381
|
+
|
|
382
|
+
Geistdocs 2.0 depends on restricted `@vercel/geistcn` and `@vercel/geistcn-assets` packages. Package installation fails without npm authentication.
|
|
383
|
+
|
|
384
|
+
For a Vercel deployment, ask `#help-core-platform` to add your Vercel project to the shared `NPM_TOKEN` environment variable list. Include the project link and required environments. Do not copy the shared token into the repository or project documentation.
|
|
385
|
+
|
|
386
|
+
For GitHub Actions, ask `#help-it` to allow the repository to use the `NPM_TOKEN` organization secret, then pass it to the install step:
|
|
387
|
+
|
|
388
|
+
```yaml title=".github/workflows/check.yml"
|
|
389
|
+
- uses: pnpm/action-setup@v4
|
|
390
|
+
|
|
391
|
+
- uses: actions/setup-node@v4
|
|
392
|
+
with:
|
|
393
|
+
node-version: 20
|
|
394
|
+
cache: pnpm
|
|
395
|
+
registry-url: https://registry.npmjs.org
|
|
396
|
+
|
|
397
|
+
- run: pnpm install
|
|
398
|
+
env:
|
|
399
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
Read [How do I use private dependencies with Vercel?](https://vercel.com/kb/guide/using-private-dependencies-with-vercel) for the platform authentication behavior.
|
|
352
403
|
|
|
353
404
|
## Deploy to Vercel
|
|
354
405
|
|
|
@@ -358,9 +409,9 @@ To deploy from the Vercel dashboard:
|
|
|
358
409
|
2. Select your Geistdocs repository
|
|
359
410
|
3. Configure your project settings:
|
|
360
411
|
- **Framework Preset**: Next.js (automatically detected)
|
|
361
|
-
- **Build Command**: `pnpm build`
|
|
412
|
+
- **Build Command**: `pnpm build`
|
|
362
413
|
- **Output Directory**: `.next` (default)
|
|
363
|
-
- **Install Command**: `pnpm install`
|
|
414
|
+
- **Install Command**: `pnpm install`
|
|
364
415
|
4. Add your environment variables (see [Environment Variables](/docs/env))
|
|
365
416
|
5. Click "Deploy"
|
|
366
417
|
|
|
@@ -379,7 +430,7 @@ The Geistdocs site does not need Vertex credentials. The platform proxy authenti
|
|
|
379
430
|
---
|
|
380
431
|
|
|
381
432
|
---
|
|
382
|
-
title:
|
|
433
|
+
title: Migrate to Geistdocs
|
|
383
434
|
description: Migrate a Fumadocs or custom Geist docs site to package-backed Geistdocs
|
|
384
435
|
type: guide
|
|
385
436
|
summary: Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
|
|
@@ -394,10 +445,13 @@ related:
|
|
|
394
445
|
- /docs/agent-readiness
|
|
395
446
|
---
|
|
396
447
|
|
|
397
|
-
#
|
|
448
|
+
# Migrate to Geistdocs
|
|
398
449
|
|
|
399
450
|
Migrate an existing Fumadocs or custom Geist documentation site to `@vercel/geistdocs` by moving shared behavior into package APIs and keeping site-specific adapters local. The safest migration keeps content, routing decisions, and product-specific UI in your app while replacing copied runtime code with thin package-backed adapters.
|
|
400
451
|
|
|
452
|
+
> Note:
|
|
453
|
+
Follow the concise [1.x → 2.0 guide](/docs/migration-2) instead. This page is for adopting Geistdocs from Fumadocs or a custom documentation site.
|
|
454
|
+
|
|
401
455
|
Help me migrate this existing docs site to package-backed Geistdocs. Inspect `source.config.ts`, `lib/geistdocs/source.ts`, app route files, `proxy.ts` or `middleware.ts`, `public/llms.txt`, Open Graph routes, Tailwind CSS setup, `package.json` AI SDK dependencies, and environment variables. Then produce a step-by-step migration plan using `@vercel/geistdocs` package APIs without copying package internals.
|
|
402
456
|
|
|
403
457
|
## Before you migrate
|
|
@@ -424,7 +478,7 @@ Fix unrelated build failures first. A migration is safer when the starting point
|
|
|
424
478
|
|
|
425
479
|
## Install Geistdocs
|
|
426
480
|
|
|
427
|
-
Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting.
|
|
481
|
+
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
482
|
|
|
429
483
|
For an existing project, use your package manager directly:
|
|
430
484
|
|
|
@@ -757,16 +811,14 @@ For a base-path application whose root page is documentation, add `"/"` to the s
|
|
|
757
811
|
Tailwind CSS v4 requires `@source` entries for package components and related dependencies.
|
|
758
812
|
|
|
759
813
|
```css title="app/styles/geistdocs.css"
|
|
760
|
-
@import "
|
|
814
|
+
@import "@vercel/geistcn/tailwind.css";
|
|
815
|
+
@import "@vercel/geistcn/styles.css";
|
|
761
816
|
@import "fumadocs-ui/css/shadcn.css";
|
|
762
817
|
@import "fumadocs-ui/css/preset.css";
|
|
763
|
-
@import "
|
|
764
|
-
|
|
765
|
-
@source "../../node_modules/@vercel/geistdocs/dist/**/*.js";
|
|
766
|
-
@source "../../node_modules/streamdown/dist/*.js";
|
|
818
|
+
@import "@vercel/geistdocs/theme.css";
|
|
767
819
|
```
|
|
768
820
|
|
|
769
|
-
|
|
821
|
+
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.
|
|
770
822
|
|
|
771
823
|
## Handle environment variables
|
|
772
824
|
|
|
@@ -807,6 +859,116 @@ Check these URLs locally:
|
|
|
807
859
|
- Read [Agent readiness](/docs/agent-readiness) to configure `/agents.md` and `/.well-known/mcp.json` for AI agents.
|
|
808
860
|
|
|
809
861
|
|
|
862
|
+
---
|
|
863
|
+
|
|
864
|
+
---
|
|
865
|
+
title: Migrate from Geistdocs 1.x to 2.0
|
|
866
|
+
description: Upgrade imports, dependencies, and routing without copying Geistdocs internals
|
|
867
|
+
type: guide
|
|
868
|
+
summary: A concise, agent-friendly checklist for upgrading an existing Geistdocs 1.x site to 2.0.
|
|
869
|
+
url: /docs/migration-2
|
|
870
|
+
source: apps/template/content/docs/migration-2.mdx
|
|
871
|
+
related:
|
|
872
|
+
- /docs/migration
|
|
873
|
+
- /docs/configuration
|
|
874
|
+
- /docs/versioned-docs
|
|
875
|
+
- /docs/proxy
|
|
876
|
+
---
|
|
877
|
+
|
|
878
|
+
# Migrate from Geistdocs 1.x to 2.0
|
|
879
|
+
|
|
880
|
+
Use this guide only for a site already running Geistdocs 1.x. Geistdocs 2.0 moves shared UI primitives and assets to Geistcn; its package-backed page, source, search, chat, proxy, and agent-readable route APIs remain the preferred integration.
|
|
881
|
+
|
|
882
|
+
Upgrade this Geistdocs site from 1.x to 2.0. Inspect `package.json`, `next.config.ts`, `source.config.ts`, the root layout, `lib/geistdocs`, `proxy.ts`, and all imports from `@vercel/geistdocs/components` or `@vercel/geistdocs/assets`. Upgrade the dependencies, replace removed generic component imports with Geistcn, keep Geistdocs-specific components and route adapters package-backed, and verify every public surface. Do not copy package internals into the app.
|
|
883
|
+
|
|
884
|
+
## 1. Upgrade dependencies
|
|
885
|
+
|
|
886
|
+
```bash title="Terminal"
|
|
887
|
+
pnpm add --save-exact @vercel/geistdocs@2 @vercel/geistcn@1.0.3 @vercel/geistcn-assets@2.0.1 next@16.3.3 react@19.2.3 react-dom@19.2.3
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
Geistdocs requires Node.js 20.9 or later. If the app directly uses Ask AI dependencies, use AI SDK v6 and `@ai-sdk/react` v3. Migrate unrelated AI features separately instead of forking Geistdocs chat code.
|
|
891
|
+
|
|
892
|
+
## 2. Replace removed imports
|
|
893
|
+
|
|
894
|
+
| Geistdocs 1.x import | Geistdocs 2.0 replacement |
|
|
895
|
+
| --- | --- |
|
|
896
|
+
| `badge`, `button`, `dialog`, `drawer`, `input`, `kbd`, `separator`, `sheet`, `spinner`, `textarea`, `theme-switcher`, or `tooltip` | Import the matching component from `@vercel/geistcn/components/<name>`. |
|
|
897
|
+
| `switch` | Use `@vercel/geistcn/components/toggle`. |
|
|
898
|
+
| `sonner` | Use `Toasts` and `useToasts` from `@vercel/geistcn/components/toasts`. |
|
|
899
|
+
| `theme-aware-image` | Use Geistcn `Image` with `srcLight` and `srcDark`. |
|
|
900
|
+
| `button-group`, `card`, or `input-group` | Choose a Geistcn component or keep an app-owned composition; there is no API-compatible replacement. |
|
|
901
|
+
| `@vercel/geistdocs/assets/icons` or `assets/icons/*` | `@vercel/geistcn-assets/icons` or `icons/*` |
|
|
902
|
+
| `@vercel/geistdocs/assets/logos` or `assets/logos/*` | `@vercel/geistcn-assets/logos` or `logos/*` |
|
|
903
|
+
|
|
904
|
+
Keep documentation-specific imports such as `callout`, `code-block`, `code-block-tabs`, `collapsible`, `command-prompt`, `copy-prompt`, `mermaid`, and `video` on `@vercel/geistdocs/components/*`.
|
|
905
|
+
|
|
906
|
+
Import the package stylesheet once and apply the Geist font classes at the root:
|
|
907
|
+
|
|
908
|
+
```tsx title="app/[lang]/layout.tsx"
|
|
909
|
+
import "@vercel/geistdocs/styles.css";
|
|
910
|
+
import { geistFontClasses } from "@vercel/geistcn/core";
|
|
911
|
+
|
|
912
|
+
export default function RootLayout({ children }: LayoutProps<"/[lang]">) {
|
|
913
|
+
return (
|
|
914
|
+
<html className={geistFontClasses}>
|
|
915
|
+
<body>{children}</body>
|
|
916
|
+
</html>
|
|
917
|
+
);
|
|
918
|
+
}
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
## 3. Use the Next.js and source integrations
|
|
922
|
+
|
|
923
|
+
```ts title="next.config.ts"
|
|
924
|
+
import { createGeistdocs } from "@vercel/geistdocs/next";
|
|
925
|
+
import type { NextConfig } from "next";
|
|
926
|
+
|
|
927
|
+
const config: NextConfig = {
|
|
928
|
+
modularizeImports: {
|
|
929
|
+
"@vercel/geistcn/components": {
|
|
930
|
+
skipDefaultConversion: true,
|
|
931
|
+
transform: "@vercel/geistcn/components/{{ kebabCase member }}",
|
|
932
|
+
},
|
|
933
|
+
"@vercel/geistcn/core": {
|
|
934
|
+
skipDefaultConversion: true,
|
|
935
|
+
transform: "@vercel/geistcn/core",
|
|
936
|
+
},
|
|
937
|
+
},
|
|
938
|
+
transpilePackages: [
|
|
939
|
+
"@vercel/geistcn",
|
|
940
|
+
"@vercel/geist-test-utils",
|
|
941
|
+
"@vercel/next-themes",
|
|
942
|
+
],
|
|
943
|
+
cacheComponents: true,
|
|
944
|
+
partialPrefetching: true,
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
export default createGeistdocs()(config);
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
In `source.config.ts`, import `defineGeistdocsSourceConfig`, `geistdocsFrontmatterSchema`, and `geistdocsMetaSchema` only from `@vercel/geistdocs/source-config`. Keep pages and route handlers as thin adapters around Geistdocs package APIs.
|
|
951
|
+
|
|
952
|
+
## 4. Preserve routing invariants
|
|
953
|
+
|
|
954
|
+
- If Next.js uses `basePath`, set the same value in Geistdocs config.
|
|
955
|
+
- Keep `content.route`, source `baseUrl`, navigation hrefs, `getPageUrl`, search results, and proxy `markdownRoutes` app-local. Next.js adds the mount prefix once; Geistdocs adds it to public metadata, Markdown, discovery links, and citations.
|
|
956
|
+
- For versioned docs, use `createVersionedSources` and pass server-computed `collectVersionSwitchPaths` to the version selector so missing pages fall back to an existing ancestor.
|
|
957
|
+
- Keep version and router dimensions in static route segments when layouts and sidebar state should persist. Build router-specific, prefix-relative path sets separately from version paths.
|
|
958
|
+
- Keep product-specific navigation titles, badges, related links, and content transforms in the app.
|
|
959
|
+
|
|
960
|
+
## 5. Verify the upgrade
|
|
961
|
+
|
|
962
|
+
- Run install, typecheck, tests, and a production build.
|
|
963
|
+
- Open representative HTML pages and their `.md` equivalents, including a not-found path.
|
|
964
|
+
- Test search, Ask AI citations, proxy rewrites, and agent-readable routes.
|
|
965
|
+
- Switch versions from pages that do and do not exist in the target version.
|
|
966
|
+
- Confirm links do not trigger broad post-load prefetching and Ask AI is not eagerly loaded.
|
|
967
|
+
- Recheck LCP, CLS, accessibility, and post-render network and CPU activity.
|
|
968
|
+
|
|
969
|
+
For a first migration from Fumadocs or a custom docs site, follow the [full migration guide](/docs/migration).
|
|
970
|
+
|
|
971
|
+
|
|
810
972
|
---
|
|
811
973
|
|
|
812
974
|
---
|
|
@@ -1205,7 +1367,9 @@ related:
|
|
|
1205
1367
|
|
|
1206
1368
|
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.
|
|
1207
1369
|
|
|
1208
|
-
Help me write a Geistdocs MDX page. Use this page as a syntax reference and
|
|
1370
|
+
Help me write a Geistdocs MDX page. Use this page as a syntax reference and
|
|
1371
|
+
create an example page with frontmatter, headings, links, a code block, a
|
|
1372
|
+
`Callout`, and a `CopyPrompt` component.
|
|
1209
1373
|
|
|
1210
1374
|
## Frontmatter
|
|
1211
1375
|
|
|
@@ -1257,11 +1421,17 @@ Headings automatically generate anchor links for navigation and deep linking.
|
|
|
1257
1421
|
|
|
1258
1422
|
Create unordered lists with `-`, `*`, or `+`:
|
|
1259
1423
|
|
|
1260
|
-
|
|
1261
|
-
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1424
|
+
```md
|
|
1425
|
+
- Install the required packages
|
|
1426
|
+
- Configure your project
|
|
1427
|
+
- Start the development server
|
|
1428
|
+
```
|
|
1429
|
+
|
|
1430
|
+
This renders as:
|
|
1431
|
+
|
|
1432
|
+
- Install the required packages
|
|
1433
|
+
- Configure your project
|
|
1434
|
+
- Start the development server
|
|
1265
1435
|
|
|
1266
1436
|
Create ordered lists with numbers:
|
|
1267
1437
|
|
|
@@ -1273,7 +1443,91 @@ Create ordered lists with numbers:
|
|
|
1273
1443
|
|
|
1274
1444
|
Use `>` to create blockquotes:
|
|
1275
1445
|
|
|
1276
|
-
>
|
|
1446
|
+
> **Watch:** Learn more about how to use `next/image` → [YouTube (9 minutes)](https://youtu.be/IU_qq_c_lKA).
|
|
1447
|
+
|
|
1448
|
+
### Callouts
|
|
1449
|
+
|
|
1450
|
+
Use `<Callout>` for a highlighted informational note:
|
|
1451
|
+
|
|
1452
|
+
```mdx
|
|
1453
|
+
<Callout>This is automatically set when deploying to Vercel.</Callout>
|
|
1454
|
+
```
|
|
1455
|
+
|
|
1456
|
+
This renders as:
|
|
1457
|
+
|
|
1458
|
+
> This is automatically set when deploying to Vercel.
|
|
1459
|
+
|
|
1460
|
+
Callouts can also contain a title and lists:
|
|
1461
|
+
|
|
1462
|
+
> Note:
|
|
1463
|
+
- The `App Router` uses [React canary
|
|
1464
|
+
releases](https://react.dev/blog/2023/05/03/react-canaries) built-in, which
|
|
1465
|
+
include all the stable React 19 changes, as well as newer features being
|
|
1466
|
+
validated in frameworks, but you should still declare react and react-dom in
|
|
1467
|
+
package.json for tooling and ecosystem compatibility.
|
|
1468
|
+
- The `Pages Router` uses the React version from your `package.json`.
|
|
1469
|
+
|
|
1470
|
+
Callouts support rich inline Markdown, including code, emphasis, and links:
|
|
1471
|
+
|
|
1472
|
+
```mdx
|
|
1473
|
+
<Callout title="Good to know">
|
|
1474
|
+
Global styles can be imported into any layout, page, or component inside the
|
|
1475
|
+
`app` directory. However, since Next.js uses React's built-in support for
|
|
1476
|
+
stylesheets to integrate with Suspense, this currently does not remove
|
|
1477
|
+
stylesheets as you navigate between routes which can lead to conflicts. We
|
|
1478
|
+
recommend using global styles for _truly global_ CSS (like Tailwind's base
|
|
1479
|
+
styles), [Tailwind CSS](https://tailwindcss.com) for component styling, and
|
|
1480
|
+
[CSS Modules](https://nextjs.org/docs/app/getting-started/css#css-modules) for
|
|
1481
|
+
custom scoped CSS when needed.
|
|
1482
|
+
</Callout>
|
|
1483
|
+
```
|
|
1484
|
+
|
|
1485
|
+
This renders as:
|
|
1486
|
+
|
|
1487
|
+
> Note:
|
|
1488
|
+
Global styles can be imported into any layout, page, or component inside the
|
|
1489
|
+
`app` directory. However, since Next.js uses React's built-in support for
|
|
1490
|
+
stylesheets to integrate with Suspense, this currently does not remove
|
|
1491
|
+
stylesheets as you navigate between routes which can lead to conflicts. We
|
|
1492
|
+
recommend using global styles for _truly global_ CSS (like Tailwind's base
|
|
1493
|
+
styles), [Tailwind CSS](https://tailwindcss.com) for component styling, and
|
|
1494
|
+
[CSS Modules](https://nextjs.org/docs/app/getting-started/css#css-modules) for
|
|
1495
|
+
custom scoped CSS when needed.
|
|
1496
|
+
|
|
1497
|
+
### Copy Prompts
|
|
1498
|
+
|
|
1499
|
+
Short prompts render in full without an expansion control:
|
|
1500
|
+
|
|
1501
|
+
```mdx
|
|
1502
|
+
<CopyPrompt text="Summarize this documentation page and list the key concepts.">
|
|
1503
|
+
Summarize this documentation page and list the key concepts.
|
|
1504
|
+
</CopyPrompt>
|
|
1505
|
+
```
|
|
1506
|
+
|
|
1507
|
+
This renders as:
|
|
1508
|
+
|
|
1509
|
+
Summarize this documentation page and list the key concepts.
|
|
1510
|
+
|
|
1511
|
+
Long prompts initially show a preview with a **Show more** control:
|
|
1512
|
+
|
|
1513
|
+
```mdx
|
|
1514
|
+
<CopyPrompt collapsible text="Write a detailed migration plan for this project.">
|
|
1515
|
+
Write a detailed migration plan for this project. Include prerequisites,
|
|
1516
|
+
implementation steps, validation, rollback guidance, and common pitfalls.
|
|
1517
|
+
</CopyPrompt>
|
|
1518
|
+
```
|
|
1519
|
+
|
|
1520
|
+
Set the boolean `collapsible` prop when the prompt should initially render as a
|
|
1521
|
+
two-line preview. This renders as:
|
|
1522
|
+
|
|
1523
|
+
Review this Geistdocs project in detail. Explain how the `@vercel/geistdocs`
|
|
1524
|
+
package, application layouts, local adapter files, source configuration,
|
|
1525
|
+
`content/docs` directory, navigation metadata, MDX components, syntax
|
|
1526
|
+
highlighting, search routes, and deployment configuration work together.
|
|
1527
|
+
Then identify the safest first files to edit, describe the effect of each
|
|
1528
|
+
change, call out common mistakes, and propose a step-by-step plan for
|
|
1529
|
+
customizing the documentation site without breaking routing, generated
|
|
1530
|
+
Markdown, or accessibility behavior.
|
|
1277
1531
|
|
|
1278
1532
|
### Links
|
|
1279
1533
|
|
|
@@ -1282,6 +1536,25 @@ Create links with `[text](url)`:
|
|
|
1282
1536
|
- [External link](https://vercel.com)
|
|
1283
1537
|
- [Internal link](/docs/getting-started)
|
|
1284
1538
|
|
|
1539
|
+
Use an absolute `https://` or `http://` URL for an external destination. Use a
|
|
1540
|
+
root-relative path beginning with `/` for an internal link. Both use the same
|
|
1541
|
+
visual styling:
|
|
1542
|
+
|
|
1543
|
+
```md
|
|
1544
|
+
[External link](https://vercel.com)
|
|
1545
|
+
[Internal link](/docs/getting-started)
|
|
1546
|
+
```
|
|
1547
|
+
|
|
1548
|
+
Links can also contain inline code:
|
|
1549
|
+
|
|
1550
|
+
```md
|
|
1551
|
+
Run independent requests in parallel with [`Promise.all`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/all).
|
|
1552
|
+
```
|
|
1553
|
+
|
|
1554
|
+
This renders as:
|
|
1555
|
+
|
|
1556
|
+
Run independent requests in parallel with [`Promise.all`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/all).
|
|
1557
|
+
|
|
1285
1558
|
### Images
|
|
1286
1559
|
|
|
1287
1560
|
Add images with ``:
|
|
@@ -1290,6 +1563,44 @@ Add images with ``:
|
|
|
1290
1563
|

|
|
1291
1564
|
```
|
|
1292
1565
|
|
|
1566
|
+
Use `<Image>` when an image needs the standard documentation presentation and
|
|
1567
|
+
an optional description. It uses Geistcn's image component without a lightbox
|
|
1568
|
+
or other interaction:
|
|
1569
|
+
|
|
1570
|
+
```mdx
|
|
1571
|
+
<Image
|
|
1572
|
+
alt="Deployment graph"
|
|
1573
|
+
caption="Requests move from the edge to the selected region."
|
|
1574
|
+
height={480}
|
|
1575
|
+
src="/deployment-graph.png"
|
|
1576
|
+
width={800}
|
|
1577
|
+
/>
|
|
1578
|
+
```
|
|
1579
|
+
|
|
1580
|
+
This renders as:
|
|
1581
|
+
|
|
1582
|
+
<Image
|
|
1583
|
+
alt="Navigation Inspector showing a loading shell for a page load"
|
|
1584
|
+
caption="The Navigation Inspector paused on a page load."
|
|
1585
|
+
height={389}
|
|
1586
|
+
srcDark="https://h8DxKfmAPhn8O0p3.public.blob.vercel-storage.com/docs/dark/inspector-load.png"
|
|
1587
|
+
srcLight="https://h8DxKfmAPhn8O0p3.public.blob.vercel-storage.com/docs/light/inspector-load.png"
|
|
1588
|
+
width={472}
|
|
1589
|
+
/>
|
|
1590
|
+
|
|
1591
|
+
For theme-aware images, provide both sources:
|
|
1592
|
+
|
|
1593
|
+
```mdx
|
|
1594
|
+
<Image
|
|
1595
|
+
alt="Deployment graph"
|
|
1596
|
+
caption="Requests move from the edge to the selected region."
|
|
1597
|
+
height={480}
|
|
1598
|
+
srcDark="/deployment-graph-dark.png"
|
|
1599
|
+
srcLight="/deployment-graph-light.png"
|
|
1600
|
+
width={800}
|
|
1601
|
+
/>
|
|
1602
|
+
```
|
|
1603
|
+
|
|
1293
1604
|
## GitHub Flavored Markdown
|
|
1294
1605
|
|
|
1295
1606
|
Geistdocs supports GFM extensions including tables, task lists, and autolinks.
|
|
@@ -1314,6 +1625,16 @@ This renders as:
|
|
|
1314
1625
|
| GFM | GitHub extensions | Supported |
|
|
1315
1626
|
| MDX | JSX in Markdown | Supported |
|
|
1316
1627
|
|
|
1628
|
+
Tables can also include inline code, as commonly used for file references:
|
|
1629
|
+
|
|
1630
|
+
| File | Description |
|
|
1631
|
+
| -------------------- | ------------------------------------------------ |
|
|
1632
|
+
| `next.config.js` | Configuration file for Next.js |
|
|
1633
|
+
| `package.json` | Project dependencies and scripts |
|
|
1634
|
+
| `instrumentation.ts` | OpenTelemetry and instrumentation file |
|
|
1635
|
+
| `.env.local` | Local environment variables |
|
|
1636
|
+
| `tsconfig.json` | Configuration file for TypeScript |
|
|
1637
|
+
|
|
1317
1638
|
### Task Lists
|
|
1318
1639
|
|
|
1319
1640
|
Create interactive task lists:
|
|
@@ -1386,6 +1707,78 @@ export const Button = ({ children }) => {
|
|
|
1386
1707
|
};
|
|
1387
1708
|
```
|
|
1388
1709
|
|
|
1710
|
+
### Tabs and switchers
|
|
1711
|
+
|
|
1712
|
+
Use consecutive fences with `tab` metadata for code tabs that expose every
|
|
1713
|
+
option at once:
|
|
1714
|
+
|
|
1715
|
+
````md
|
|
1716
|
+
```ts tab="TypeScript" title="example.ts"
|
|
1717
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1718
|
+
```
|
|
1719
|
+
|
|
1720
|
+
```js tab="JavaScript" title="example.js"
|
|
1721
|
+
export const greeting = "Hello from JavaScript";
|
|
1722
|
+
```
|
|
1723
|
+
````
|
|
1724
|
+
|
|
1725
|
+
This renders as:
|
|
1726
|
+
|
|
1727
|
+
```ts tab="TypeScript" title="example.ts"
|
|
1728
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1729
|
+
```
|
|
1730
|
+
|
|
1731
|
+
```js tab="JavaScript" title="example.js"
|
|
1732
|
+
export const greeting = "Hello from JavaScript";
|
|
1733
|
+
```
|
|
1734
|
+
|
|
1735
|
+
Wrap the same fences in `<CodeBlockTabs compact>` to move the selector into the
|
|
1736
|
+
code-block header:
|
|
1737
|
+
|
|
1738
|
+
````mdx
|
|
1739
|
+
<CompactCodeBlockTabs defaultValue="TypeScript">
|
|
1740
|
+
<CodeBlockTabsList>
|
|
1741
|
+
<CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
|
|
1742
|
+
<CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
|
|
1743
|
+
</CodeBlockTabsList>
|
|
1744
|
+
<CodeBlockTab value="TypeScript">
|
|
1745
|
+
```ts title="example.ts"
|
|
1746
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1747
|
+
```
|
|
1748
|
+
</CodeBlockTab>
|
|
1749
|
+
<CodeBlockTab value="JavaScript">
|
|
1750
|
+
```js title="example.js"
|
|
1751
|
+
export const greeting = "Hello from JavaScript";
|
|
1752
|
+
```
|
|
1753
|
+
</CodeBlockTab>
|
|
1754
|
+
</CompactCodeBlockTabs>
|
|
1755
|
+
````
|
|
1756
|
+
|
|
1757
|
+
This renders as:
|
|
1758
|
+
|
|
1759
|
+
<CompactCodeBlockTabs defaultValue="TypeScript">
|
|
1760
|
+
<CodeBlockTabsList>
|
|
1761
|
+
<CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
|
|
1762
|
+
<CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
|
|
1763
|
+
</CodeBlockTabsList>
|
|
1764
|
+
<CodeBlockTab value="TypeScript">
|
|
1765
|
+
```ts title="example.ts"
|
|
1766
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1767
|
+
```
|
|
1768
|
+
</CodeBlockTab>
|
|
1769
|
+
<CodeBlockTab value="JavaScript">
|
|
1770
|
+
```js title="example.js"
|
|
1771
|
+
export const greeting = "Hello from JavaScript";
|
|
1772
|
+
```
|
|
1773
|
+
</CodeBlockTab>
|
|
1774
|
+
</CompactCodeBlockTabs>
|
|
1775
|
+
|
|
1776
|
+
When migrating an existing site such as next-site, translate adjacent
|
|
1777
|
+
`switcher` fences to `tab="TypeScript"` and `tab="JavaScript"`, then wrap the
|
|
1778
|
+
pair with `<CodeBlockTabs compact>`. Import `@vercel/geistdocs/styles.css` (or
|
|
1779
|
+
`theme.css` with the documented Geist dependencies) so Tailwind scans the
|
|
1780
|
+
package's compiled components and emits the tab layout utilities.
|
|
1781
|
+
|
|
1389
1782
|
### Framework icons
|
|
1390
1783
|
|
|
1391
1784
|
Append `#<framework>` to the title to show a framework logo instead of the
|
|
@@ -1394,22 +1787,22 @@ values are `#next` / `#nextjs` and `#svelte` / `#sveltekit`:
|
|
|
1394
1787
|
|
|
1395
1788
|
````md
|
|
1396
1789
|
```ts title="flags.ts#next"
|
|
1397
|
-
import { flag } from
|
|
1790
|
+
import { flag } from "flags/next";
|
|
1398
1791
|
```
|
|
1399
1792
|
|
|
1400
1793
|
```ts title="flags.ts#svelte"
|
|
1401
|
-
import { flag } from
|
|
1794
|
+
import { flag } from "flags/sveltekit";
|
|
1402
1795
|
```
|
|
1403
1796
|
````
|
|
1404
1797
|
|
|
1405
1798
|
This renders as:
|
|
1406
1799
|
|
|
1407
1800
|
```ts title="flags.ts#next"
|
|
1408
|
-
import { flag } from
|
|
1801
|
+
import { flag } from "flags/next";
|
|
1409
1802
|
```
|
|
1410
1803
|
|
|
1411
1804
|
```ts title="flags.ts#svelte"
|
|
1412
|
-
import { flag } from
|
|
1805
|
+
import { flag } from "flags/sveltekit";
|
|
1413
1806
|
```
|
|
1414
1807
|
|
|
1415
1808
|
### Line Numbers
|
|
@@ -1898,7 +2291,7 @@ Each version can define an `icon` to override the default current/previous versi
|
|
|
1898
2291
|
Use `GeistdocsRouteSelect` for framework, product, or route switchers that should not use version-specific labels:
|
|
1899
2292
|
|
|
1900
2293
|
```tsx
|
|
1901
|
-
import {
|
|
2294
|
+
import { LogoIconNextSvg, LogoSvelte } from "@vercel/geistcn-assets/logos";
|
|
1902
2295
|
import { GeistdocsRouteSelect } from "@vercel/geistdocs/versions";
|
|
1903
2296
|
|
|
1904
2297
|
<GeistdocsRouteSelect
|
|
@@ -1909,14 +2302,14 @@ import { GeistdocsRouteSelect } from "@vercel/geistdocs/versions";
|
|
|
1909
2302
|
id: "nextjs",
|
|
1910
2303
|
label: "Next.js",
|
|
1911
2304
|
description: "React framework",
|
|
1912
|
-
icon: <
|
|
2305
|
+
icon: <LogoIconNextSvg size={18} />,
|
|
1913
2306
|
href: "/:path*",
|
|
1914
2307
|
},
|
|
1915
2308
|
{
|
|
1916
2309
|
id: "sveltekit",
|
|
1917
2310
|
label: "SvelteKit",
|
|
1918
2311
|
description: "Svelte framework",
|
|
1919
|
-
icon: <
|
|
2312
|
+
icon: <LogoSvelte height={18} />,
|
|
1920
2313
|
routePrefix: "/sveltekit",
|
|
1921
2314
|
href: "/sveltekit/:path*",
|
|
1922
2315
|
},
|
|
@@ -2279,7 +2672,7 @@ The `.mdx` version returns:
|
|
|
2279
2672
|
|
|
2280
2673
|
For a docs section mounted at `/docs`, the section root remains `/docs.md`. For a source mounted at the app root with `baseUrl: "/"`, Geistdocs uses `/index.md` for the root page. If Next.js has `basePath: "/docs"`, that public root Markdown URL is `/docs/index.md`.
|
|
2281
2674
|
|
|
2282
|
-
Copy Page, View as Markdown, and the `text/markdown` metadata alternate all use the same package resolver. Use `createDocsPage({ getMarkdownUrl })` only when the deployment needs a different public contract.
|
|
2675
|
+
Copy Page, View as Markdown, and the `text/markdown` metadata alternate all use the same package resolver. View as Markdown opens the resolved `.md` URL in a new tab from a button, which keeps the URL shareable without adding an anchor to the page. Use `createDocsPage({ getMarkdownUrl })` only when the deployment needs a different public contract.
|
|
2283
2676
|
|
|
2284
2677
|
## Use cases
|
|
2285
2678
|
|
|
@@ -2611,7 +3004,7 @@ In this mode, Geistdocs uses the local `search_docs` tool during the AI SDK `str
|
|
|
2611
3004
|
|
|
2612
3005
|
#### Choose a model
|
|
2613
3006
|
|
|
2614
|
-
Pass the `model` option to `createChatRoute` to control which model answers Ask AI requests. It accepts any AI SDK `LanguageModel`, including AI Gateway model strings, and defaults to `openai/gpt-
|
|
3007
|
+
Pass the `model` option to `createChatRoute` to control which model answers Ask AI requests. It accepts any AI SDK `LanguageModel`, including AI Gateway model strings, and defaults to `openai/gpt-5.6-sol`.
|
|
2615
3008
|
|
|
2616
3009
|
```ts title="app/api/chat/route.ts"
|
|
2617
3010
|
import { createChatRoute } from "@vercel/geistdocs/routes/chat";
|
|
@@ -2720,7 +3113,7 @@ The chat interface adapts to different screen sizes:
|
|
|
2720
3113
|
|
|
2721
3114
|
The environment variables `AI_GATEWAY_API_KEY` and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` must be set for the default AI Gateway mode. Set `GEISTDOCS_CHAT_PROXY_URL` to route Ask AI through a Vertex-backed proxy instead. You can read more in the [Environment Variables](/docs/env) section.
|
|
2722
3115
|
|
|
2723
|
-
In default AI Gateway mode, Geistdocs uses `openai/gpt-
|
|
3116
|
+
In default AI Gateway mode, Geistdocs uses `openai/gpt-5.6-sol` via the Vercel AI Gateway. In Vertex-backed proxy mode, the configured proxy controls the upstream model.
|
|
2724
3117
|
|
|
2725
3118
|
## Suggested Prompts
|
|
2726
3119
|
|
|
@@ -2931,7 +3324,7 @@ Geistdocs applies a color for each method:
|
|
|
2931
3324
|
| `PUT`, `PATCH` | Amber |
|
|
2932
3325
|
| `DEL`, `DELETE` | Red |
|
|
2933
3326
|
|
|
2934
|
-
Method matching is case-sensitive, so use uppercase labels. `DEL` and `DELETE` render the same red badge, so prefer `DEL` when you want a narrower badge.
|
|
3327
|
+
Method matching is case-sensitive, so use uppercase labels. `DEL` and `DELETE` render the same red badge, so prefer `DEL` when you want a narrower badge. `New` renders as a low-contrast blue badge; other labels, such as `Beta`, use the default neutral badge. Badge colors adapt to light and dark themes automatically.
|
|
2935
3328
|
|
|
2936
3329
|
## Add links to the navigation
|
|
2937
3330
|
|
|
@@ -3607,66 +4000,3 @@ On mobile, Geistdocs replaces the sidebar outline with a compact menu in the pag
|
|
|
3607
4000
|
|
|
3608
4001
|
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.
|
|
3609
4002
|
|
|
3610
|
-
|
|
3611
|
-
---
|
|
3612
|
-
|
|
3613
|
-
---
|
|
3614
|
-
title: Theme-Aware Image
|
|
3615
|
-
description: Display different images based on the user's light or dark theme preference
|
|
3616
|
-
type: reference
|
|
3617
|
-
summary: A component that swaps images based on the active theme, built on top of Next.js Image.
|
|
3618
|
-
url: /docs/theme-aware-image
|
|
3619
|
-
source: apps/template/content/docs/theme-aware-image.mdx
|
|
3620
|
-
prerequisites:
|
|
3621
|
-
- /docs/getting-started
|
|
3622
|
-
- /docs/provider
|
|
3623
|
-
related:
|
|
3624
|
-
- /docs/syntax
|
|
3625
|
-
- /docs/configuration
|
|
3626
|
-
---
|
|
3627
|
-
|
|
3628
|
-
# Theme-Aware Image
|
|
3629
|
-
|
|
3630
|
-
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.
|
|
3631
|
-
|
|
3632
|
-
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.
|
|
3633
|
-
|
|
3634
|
-
## Usage
|
|
3635
|
-
|
|
3636
|
-
Import the component and pass a `src` object with `light` and `dark` variants:
|
|
3637
|
-
|
|
3638
|
-
```tsx
|
|
3639
|
-
import { ThemeAwareImage } from "@vercel/geistdocs/components/theme-aware-image";
|
|
3640
|
-
|
|
3641
|
-
<ThemeAwareImage
|
|
3642
|
-
src={{
|
|
3643
|
-
light: "/images/diagram-light.png",
|
|
3644
|
-
dark: "/images/diagram-dark.png",
|
|
3645
|
-
}}
|
|
3646
|
-
alt="Architecture diagram"
|
|
3647
|
-
width={800}
|
|
3648
|
-
height={400}
|
|
3649
|
-
/>
|
|
3650
|
-
```
|
|
3651
|
-
|
|
3652
|
-
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.
|
|
3653
|
-
|
|
3654
|
-
## How it works
|
|
3655
|
-
|
|
3656
|
-
`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".
|
|
3657
|
-
|
|
3658
|
-
- When `resolvedTheme` is `"dark"`, the `src.dark` image is displayed.
|
|
3659
|
-
- Otherwise, the `src.light` image is used.
|
|
3660
|
-
|
|
3661
|
-
Because this component relies on client-side theme detection, it is a client component (`"use client"`).
|
|
3662
|
-
|
|
3663
|
-
## Props
|
|
3664
|
-
|
|
3665
|
-
| Prop | Type | Description |
|
|
3666
|
-
| --- | --- | --- |
|
|
3667
|
-
| `src` | `{ light: ImageProps["src"]; dark: ImageProps["src"] }` | An object containing the light and dark image sources |
|
|
3668
|
-
| `alt` | `string` | Accessible alt text for the image |
|
|
3669
|
-
| `width` | `number` | The width of the image in pixels |
|
|
3670
|
-
| `height` | `number` | The height of the image in pixels |
|
|
3671
|
-
| `...rest` | `ImageProps` | Any additional props supported by the Next.js `Image` component |
|
|
3672
|
-
|