@vercel/geistdocs 1.28.0 → 2.0.0
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/assets/geistcn/__internal__/components/icon/base-icon.d.ts +59 -0
- package/dist/assets/geistcn/__internal__/components/icon/base-icon.d.ts.map +1 -0
- package/dist/assets/geistcn/__internal__/components/icon/base-icon.js +32 -0
- package/dist/assets/geistcn/__internal__/components/logo/base-logo-svg.d.ts +65 -0
- package/dist/assets/geistcn/__internal__/components/logo/base-logo-svg.d.ts.map +1 -0
- package/dist/assets/geistcn/__internal__/components/logo/base-logo-svg.js +41 -0
- package/dist/assets/geistcn/__internal__/types/color.d.ts +12 -0
- package/dist/assets/geistcn/__internal__/types/color.d.ts.map +1 -0
- package/dist/assets/geistcn/__internal__/types/color.js +25 -0
- package/dist/assets/geistcn/__internal__/types/icon.d.ts +6 -0
- package/dist/assets/geistcn/__internal__/types/icon.d.ts.map +1 -0
- package/dist/assets/geistcn/__internal__/types/icon.js +1 -0
- package/dist/assets/geistcn/__internal__/utils/calculate-icon-dimensions.d.ts +16 -0
- package/dist/assets/geistcn/__internal__/utils/calculate-icon-dimensions.d.ts.map +1 -0
- package/dist/assets/geistcn/__internal__/utils/calculate-icon-dimensions.js +15 -0
- package/dist/assets/geistcn/__internal__/utils/calculate-logo-dimensions.d.ts +30 -0
- package/dist/assets/geistcn/__internal__/utils/calculate-logo-dimensions.d.ts.map +1 -0
- package/dist/assets/geistcn/__internal__/utils/calculate-logo-dimensions.js +30 -0
- package/dist/assets/geistcn/__internal__/utils/parse-icon-size.d.ts +8 -0
- package/dist/assets/geistcn/__internal__/utils/parse-icon-size.d.ts.map +1 -0
- package/dist/assets/geistcn/__internal__/utils/parse-icon-size.js +13 -0
- package/dist/assets/geistcn/__internal__/utils/svg-color.d.ts +13 -0
- package/dist/assets/geistcn/__internal__/utils/svg-color.d.ts.map +1 -0
- package/dist/assets/geistcn/__internal__/utils/svg-color.js +10 -0
- package/dist/assets/geistcn/icons/named/icon-acronym-markdown.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-acronym-markdown.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-acronym-markdown.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-archive.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-archive.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-archive.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-circle-up.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-circle-up.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-circle-up.js +26 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-down.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-down.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-down.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-up-right-small.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-up-right-small.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-up-right-small.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-up.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-up.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-arrow-up.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-bookmark.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-bookmark.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-bookmark.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-box.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-box.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-box.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-check.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-check.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-check.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-double-right.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-double-right.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-double-right.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-down-small.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-down-small.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-down-small.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-down.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-down.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-down.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-left.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-left.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-left.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-right-small.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-right-small.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-right-small.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-right.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-right.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-right.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-up-down.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-up-down.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-up-down.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-up.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-up.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-chevron-up.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-circle.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-circle.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-circle.js +26 -0
- package/dist/assets/geistcn/icons/named/icon-copy.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-copy.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-copy.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-credit-card.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-credit-card.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-credit-card.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-cross.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-cross.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-cross.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-device-desktop.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-device-desktop.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-device-desktop.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-external.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-external.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-external.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-file-text.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-file-text.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-file-text.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-file.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-file.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-file.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-fluid.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-fluid.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-fluid.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-information.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-information.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-information.js +26 -0
- package/dist/assets/geistcn/icons/named/icon-languages.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-languages.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-languages.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-link.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-link.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-link.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-menu-alt.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-menu-alt.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-menu-alt.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-message.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-message.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-message.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-moon.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-moon.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-moon.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-rss.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-rss.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-rss.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-slash-forward.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-slash-forward.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-slash-forward.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-stop-circle.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-stop-circle.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-stop-circle.js +26 -0
- package/dist/assets/geistcn/icons/named/icon-sun.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-sun.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-sun.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-terminal.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-terminal.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-terminal.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-thumb-up.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-thumb-up.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-thumb-up.js +25 -0
- package/dist/assets/geistcn/icons/named/icon-trash.d.ts +26 -0
- package/dist/assets/geistcn/icons/named/icon-trash.d.ts.map +1 -0
- package/dist/assets/geistcn/icons/named/icon-trash.js +25 -0
- package/dist/assets/geistcn/logos/named/logo-eve-svg.d.ts +35 -0
- package/dist/assets/geistcn/logos/named/logo-eve-svg.d.ts.map +1 -0
- package/dist/assets/geistcn/logos/named/logo-eve-svg.js +37 -0
- package/dist/assets/geistcn/logos/named/logo-icon-github-svg.d.ts +27 -0
- package/dist/assets/geistcn/logos/named/logo-icon-github-svg.d.ts.map +1 -0
- package/dist/assets/geistcn/logos/named/logo-icon-github-svg.js +27 -0
- package/dist/assets/geistcn/logos/named/logo-icon-v0-svg.d.ts +27 -0
- package/dist/assets/geistcn/logos/named/logo-icon-v0-svg.d.ts.map +1 -0
- package/dist/assets/geistcn/logos/named/logo-icon-v0-svg.js +26 -0
- package/dist/assets/geistcn/logos/named/logo-icon-vercel-fill-svg.d.ts +27 -0
- package/dist/assets/geistcn/logos/named/logo-icon-vercel-fill-svg.d.ts.map +1 -0
- package/dist/assets/geistcn/logos/named/logo-icon-vercel-fill-svg.js +26 -0
- package/dist/assets/geistcn/logos/named/logo-icon-vercel-svg.d.ts +27 -0
- package/dist/assets/geistcn/logos/named/logo-icon-vercel-svg.d.ts.map +1 -0
- package/dist/assets/geistcn/logos/named/logo-icon-vercel-svg.js +26 -0
- package/dist/assets/geistcn/logos/named/logo-next-js-svg.d.ts +35 -0
- package/dist/assets/geistcn/logos/named/logo-next-js-svg.d.ts.map +1 -0
- package/dist/assets/geistcn/logos/named/logo-next-js-svg.js +37 -0
- package/dist/assets/geistcn/logos/named/logo-svelte-svg.d.ts +35 -0
- package/dist/assets/geistcn/logos/named/logo-svelte-svg.d.ts.map +1 -0
- package/dist/assets/geistcn/logos/named/logo-svelte-svg.js +37 -0
- package/dist/assets/geistcn/logos/named/logo-vercel-oss-svg.d.ts +35 -0
- package/dist/assets/geistcn/logos/named/logo-vercel-oss-svg.d.ts.map +1 -0
- package/dist/assets/geistcn/logos/named/logo-vercel-oss-svg.js +37 -0
- package/dist/assets/icons/index.d.ts +1 -4
- package/dist/assets/icons/index.d.ts.map +1 -1
- package/dist/assets/icons/index.js +1 -4
- package/dist/assets/logos/index.d.ts +1 -4
- package/dist/assets/logos/index.d.ts.map +1 -1
- package/dist/assets/logos/index.js +1 -4
- package/dist/cli/index.js +5 -5
- 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/steps.d.ts +9 -0
- package/dist/components/steps.d.ts.map +1 -0
- package/dist/components/steps.js +9 -0
- 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/internal/changelog-entries.d.ts.map +1 -1
- package/dist/internal/changelog-entries.js +3 -3
- 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 +43 -46
- 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.js +3 -3
- 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/markdown-negotiation.d.ts +2 -0
- package/dist/internal/markdown-negotiation.d.ts.map +1 -0
- package/dist/internal/markdown-negotiation.js +3 -0
- package/dist/internal/mdx-to-markdown.d.ts +3 -0
- package/dist/internal/mdx-to-markdown.d.ts.map +1 -0
- package/dist/internal/mdx-to-markdown.js +166 -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 +5 -7
- 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 +51 -30
- package/dist/internal/page-breadcrumb.js +3 -3
- 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/react-node-text.d.ts +4 -0
- package/dist/internal/react-node-text.d.ts.map +1 -0
- package/dist/internal/react-node-text.js +11 -0
- 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 +6 -1
- 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 +19 -8
- 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.js +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 +2 -0
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +20 -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/providers/public/components/badge.d.ts +8 -0
- package/dist/providers/public/components/badge.d.ts.map +1 -0
- package/dist/providers/public/components/badge.js +10 -0
- package/dist/providers/public/components/button.d.ts +18 -0
- package/dist/providers/public/components/button.d.ts.map +1 -0
- package/dist/providers/public/components/button.js +24 -0
- package/dist/providers/public/components/code-block-server.d.ts +11 -0
- package/dist/providers/public/components/code-block-server.d.ts.map +1 -0
- package/dist/providers/public/components/code-block-server.js +26 -0
- package/dist/providers/public/components/code-block.d.ts +10 -0
- package/dist/providers/public/components/code-block.d.ts.map +1 -0
- package/dist/providers/public/components/code-block.js +3 -0
- package/dist/providers/public/components/copy-button.d.ts +7 -0
- package/dist/providers/public/components/copy-button.d.ts.map +1 -0
- package/dist/providers/public/components/copy-button.js +23 -0
- package/dist/providers/public/components/drawer.d.ts +13 -0
- package/dist/providers/public/components/drawer.d.ts.map +1 -0
- package/dist/providers/public/components/drawer.js +10 -0
- package/dist/providers/public/components/image.d.ts +7 -0
- package/dist/providers/public/components/image.d.ts.map +1 -0
- package/dist/providers/public/components/image.js +4 -0
- package/dist/providers/public/components/kbd.d.ts +7 -0
- package/dist/providers/public/components/kbd.d.ts.map +1 -0
- package/dist/providers/public/components/kbd.js +10 -0
- package/dist/providers/public/components/modal.d.ts +22 -0
- package/dist/providers/public/components/modal.d.ts.map +1 -0
- package/dist/providers/public/components/modal.js +19 -0
- package/dist/{internal/ui → providers/public/components}/sheet.d.ts +2 -1
- package/dist/providers/public/components/sheet.d.ts.map +1 -0
- package/dist/{internal/ui → providers/public/components}/sheet.js +5 -5
- package/dist/providers/public/components/skeleton.d.ts +10 -0
- package/dist/providers/public/components/skeleton.d.ts.map +1 -0
- package/dist/providers/public/components/skeleton.js +3 -0
- package/dist/{internal/ui → providers/public/components}/spinner.d.ts +1 -1
- package/dist/providers/public/components/spinner.d.ts.map +1 -0
- package/dist/providers/public/components/spinner.js +11 -0
- package/dist/providers/public/components/textarea.d.ts.map +1 -0
- package/dist/{internal/ui → providers/public/components}/textarea.js +1 -1
- package/dist/providers/public/components/theme-switcher.d.ts.map +1 -0
- package/dist/{components → providers/public/components}/theme-switcher.js +7 -7
- package/dist/providers/public/components/toasts.d.ts +10 -0
- package/dist/providers/public/components/toasts.d.ts.map +1 -0
- package/dist/providers/public/components/toasts.js +8 -0
- package/dist/providers/public/components/tooltip.d.ts +13 -0
- package/dist/providers/public/components/tooltip.d.ts.map +1 -0
- package/dist/providers/public/components/tooltip.js +5 -0
- package/dist/providers/public/core/fonts.d.ts +2 -0
- package/dist/providers/public/core/fonts.d.ts.map +1 -0
- package/dist/providers/public/core/fonts.js +24 -0
- package/dist/providers/public/core/provider.d.ts +8 -0
- package/dist/providers/public/core/provider.d.ts.map +1 -0
- package/dist/providers/public/core/provider.js +4 -0
- package/dist/providers/public/core/theme-script.d.ts +5 -0
- package/dist/providers/public/core/theme-script.d.ts.map +1 -0
- package/dist/providers/public/core/theme-script.js +7 -0
- package/dist/providers/public/core.d.ts +5 -0
- package/dist/providers/public/core.d.ts.map +1 -0
- package/dist/providers/public/core.js +4 -0
- package/dist/{internal/cn.d.ts → providers/public/utils.d.ts} +1 -1
- package/dist/providers/public/utils.d.ts.map +1 -0
- package/dist/providers/public-assets/icons/icon-check.d.ts +2 -0
- package/dist/providers/public-assets/icons/icon-check.d.ts.map +1 -0
- package/dist/providers/public-assets/icons/icon-check.js +1 -0
- package/dist/providers/public-assets/icons/icon-chevron-down-small.d.ts +2 -0
- package/dist/providers/public-assets/icons/icon-chevron-down-small.d.ts.map +1 -0
- package/dist/providers/public-assets/icons/icon-chevron-down-small.js +1 -0
- package/dist/providers/public-assets/icons/icon-copy.d.ts +2 -0
- package/dist/providers/public-assets/icons/icon-copy.d.ts.map +1 -0
- package/dist/providers/public-assets/icons/icon-copy.js +1 -0
- package/dist/providers/public-assets/icons.d.ts +40 -0
- package/dist/providers/public-assets/icons.d.ts.map +1 -0
- package/dist/providers/public-assets/icons.js +39 -0
- package/dist/providers/public-assets/logos.d.ts +9 -0
- package/dist/providers/public-assets/logos.d.ts.map +1 -0
- package/dist/providers/public-assets/logos.js +8 -0
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +12 -26
- 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/routes/not-found.d.ts.map +1 -1
- package/dist/routes/not-found.js +3 -3
- package/dist/source-config.d.ts +10 -0
- package/dist/source-config.d.ts.map +1 -1
- package/dist/source-config.js +20 -2
- package/dist/source.d.ts +10 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +75 -36
- package/dist/versions.d.ts.map +1 -1
- package/dist/versions.js +5 -5
- package/docs/agents.md +5 -4
- package/docs/llms.txt +520 -140
- package/docs/manifest.json +21 -12
- package/docs/pages/ask-ai.md +3 -4
- package/docs/pages/components/steps.md +129 -0
- package/docs/pages/deployment.md +6 -3
- package/docs/pages/getting-started.md +23 -29
- package/docs/pages/guides/nested-navigation.md +1 -1
- package/docs/pages/md.md +25 -6
- package/docs/pages/migration.md +11 -15
- package/docs/pages/packages.md +54 -0
- package/docs/pages/proxy.md +7 -1
- package/docs/pages/syntax.md +246 -11
- package/docs/pages/versioned-docs.md +2 -3
- package/docs/sitemap.md +4 -3
- package/package.json +36 -90
- package/public-foundation.css +681 -0
- package/shared-theme.css +349 -0
- package/source-config.js +37 -2
- package/styles.css +1 -2
- package/template/AGENTS.md +15 -6
- package/template/app/[lang]/(home)/components/cta.tsx +8 -3
- package/template/app/[lang]/(home)/components/hero.tsx +1 -1
- 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 +13 -18
- package/template/components.json +0 -1
- package/template/content/docs/ask-ai.cn.mdx +2 -2
- package/template/content/docs/ask-ai.mdx +3 -4
- package/template/content/docs/components/meta.json +4 -0
- package/template/content/docs/components/steps.mdx +125 -0
- package/template/content/docs/configuration.cn.mdx +1 -3
- package/template/content/docs/deployment.mdx +8 -4
- package/template/content/docs/getting-started.mdx +24 -30
- package/template/content/docs/guides/nested-navigation.mdx +1 -1
- package/template/content/docs/md.mdx +25 -6
- package/template/content/docs/meta.json +3 -0
- package/template/content/docs/migration.mdx +12 -16
- package/template/content/docs/packages.mdx +53 -0
- package/template/content/docs/proxy.cn.mdx +1 -1
- package/template/content/docs/proxy.mdx +7 -1
- package/template/content/docs/syntax.mdx +252 -11
- package/template/content/docs/versioned-docs.mdx +2 -3
- package/template/next.config.ts +9 -1
- package/template/package.json +2 -8
- package/theme.css +2 -955
- 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.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- package/dist/internal/ui/spinner.js +0 -6
- package/dist/internal/ui/textarea.d.ts.map +0 -1
- 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/components/ui/button.tsx +0 -60
- package/template/content/docs/theme-aware-image.mdx +0 -57
- /package/dist/{internal/ui → providers/public/components}/textarea.d.ts +0 -0
- /package/dist/{components → providers/public/components}/theme-switcher.d.ts +0 -0
- /package/dist/{internal/cn.js → providers/public/utils.js} +0 -0
package/docs/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Geistdocs Package Documentation
|
|
2
2
|
|
|
3
|
-
These docs are bundled with `@vercel/geistdocs`
|
|
3
|
+
These docs are bundled with `@vercel/geistdocs` 2.0.0.
|
|
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, Mixedbread retrieval, proxy mode, and production URL configuration.
|
|
11
|
-
- [Deploy to Vercel](pages/deployment.md): Deploy a Geistdocs site to Vercel with the required project settings
|
|
12
|
-
- [
|
|
11
|
+
- [Deploy to Vercel](pages/deployment.md): Deploy a Geistdocs site to Vercel with the required project settings and environment variables.
|
|
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
|
+
- [Choose a Geistdocs package](pages/packages.md): Use the public package by default and the private package only where restricted Vercel npm dependencies are already available.
|
|
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.
|
|
@@ -27,8 +28,8 @@ They describe how to build package-backed Geistdocs sites and how to use the pac
|
|
|
27
28
|
- [llms.txt](pages/llms-txt.md): A single endpoint that returns all documentation as plain Markdown text following the llms.txt standard.
|
|
28
29
|
- [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.
|
|
29
30
|
- [RSS](pages/rss.md): An automatically generated RSS 2.0 feed that keeps users informed when documentation is published or updated.
|
|
31
|
+
- [Steps](pages/components/steps.md): Write consecutive headings that start with a number, such as "### 1. Install", to render a numbered step list. The Steps and Step components cover cases where a heading must be wrapped in another component.
|
|
30
32
|
- [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.
|
|
31
|
-
- [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.
|
|
32
33
|
- [WebMCP](pages/webmcp.md): Expose documentation search and page reading to browser agents.
|
|
33
34
|
|
|
34
35
|
---
|
|
@@ -153,9 +154,9 @@ related:
|
|
|
153
154
|
|
|
154
155
|
# Getting Started
|
|
155
156
|
|
|
156
|
-
Create a Geistdocs site with the package CLI, then
|
|
157
|
+
Create a new Geistdocs 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). Read [Choose a Geistdocs package](/docs/packages) before using the private package.
|
|
157
158
|
|
|
158
|
-
|
|
159
|
+
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.
|
|
159
160
|
|
|
160
161
|
## Prerequisites
|
|
161
162
|
|
|
@@ -165,25 +166,7 @@ Before you begin, install:
|
|
|
165
166
|
- pnpm
|
|
166
167
|
- Git
|
|
167
168
|
|
|
168
|
-
The
|
|
169
|
-
|
|
170
|
-
## Choose a release channel
|
|
171
|
-
|
|
172
|
-
Use `@vercel/geistdocs@latest` for the current stable package-backed release. Use `@vercel/geistdocs@canary` only when you need changes being evaluated on the `canary` branch, including the current Geistcn migration.
|
|
173
|
-
|
|
174
|
-
The canary dist-tag can move several times in one day. The CLI resolves the tag once and writes that exact version to the generated `package.json`.
|
|
175
|
-
|
|
176
|
-
## Authenticate for the Geistcn canary
|
|
177
|
-
|
|
178
|
-
The Geistcn canary depends on restricted `@vercel/geistcn` and `@vercel/geistcn-assets` packages. Configure npm authentication before running the canary CLI. Add this configuration to your user-level `~/.npmrc`:
|
|
179
|
-
|
|
180
|
-
```ini title="~/.npmrc"
|
|
181
|
-
@vercel:registry=https://registry.npmjs.org/
|
|
182
|
-
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
|
183
|
-
always-auth=true
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Set `NPM_TOKEN` from an approved internal source and keep its value out of files and Git. Stable Geistdocs does not currently require these restricted packages. Read [Deploy to Vercel](/docs/deployment) before configuring automated installs.
|
|
169
|
+
The CLI always uses pnpm to install the generated project's dependencies.
|
|
187
170
|
|
|
188
171
|
## Create a project
|
|
189
172
|
|
|
@@ -193,19 +176,13 @@ Run the Geistdocs CLI from an empty parent folder. For stable Geistdocs, run:
|
|
|
193
176
|
pnpm dlx @vercel/geistdocs@latest init --name my-docs
|
|
194
177
|
```
|
|
195
178
|
|
|
196
|
-
For the Geistcn canary, run:
|
|
197
|
-
|
|
198
|
-
```bash title="Terminal"
|
|
199
|
-
pnpm dlx @vercel/geistdocs@canary init --name my-docs
|
|
200
|
-
```
|
|
201
|
-
|
|
202
179
|
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.
|
|
203
180
|
|
|
204
181
|
## Understand generated dependencies
|
|
205
182
|
|
|
206
|
-
Generated projects include
|
|
183
|
+
Generated projects pin the resolved package version and include AI SDK v6 and `@ai-sdk/react` v3. The public package does not require private npm access. The template already configures styles, fonts, Cache Components, Partial Prefetching, source adapters, search, Ask AI, and agent-readable routes.
|
|
207
184
|
|
|
208
|
-
|
|
185
|
+
Keep those integrations package-backed. Update Geistdocs instead of copying package internals into the app.
|
|
209
186
|
|
|
210
187
|
## Start the development server
|
|
211
188
|
|
|
@@ -218,6 +195,14 @@ pnpm dev
|
|
|
218
195
|
|
|
219
196
|
Open `http://localhost:3000` in your browser.
|
|
220
197
|
|
|
198
|
+
Start with these files:
|
|
199
|
+
|
|
200
|
+
- `geistdocs.tsx` for the site title, logo, navigation, repository, and AI prompt.
|
|
201
|
+
- `content/docs/index.mdx` for the documentation overview.
|
|
202
|
+
- `content/docs/meta.json` for sidebar order and groups.
|
|
203
|
+
|
|
204
|
+
Only customize `components/geistdocs/*`, `lib/geistdocs/*`, or route adapters when the generated defaults do not fit your site.
|
|
205
|
+
|
|
221
206
|
## Edit your first page
|
|
222
207
|
|
|
223
208
|
Docs live in `content/docs`. Edit the overview page:
|
|
@@ -276,6 +261,16 @@ pnpm exec geistdocs update
|
|
|
276
261
|
|
|
277
262
|
Review and test dependency changes before committing.
|
|
278
263
|
|
|
264
|
+
## Verify and deploy
|
|
265
|
+
|
|
266
|
+
Run a production build before publishing:
|
|
267
|
+
|
|
268
|
+
```bash title="Terminal"
|
|
269
|
+
pnpm build
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Then follow [Deploy to Vercel](/docs/deployment), including environment-variable setup. Private-package access is required only for `@vercel/geistdocs-private`.
|
|
273
|
+
|
|
279
274
|
|
|
280
275
|
---
|
|
281
276
|
|
|
@@ -359,7 +354,7 @@ Set this variable explicitly when deploying outside Vercel. Use a hostname such
|
|
|
359
354
|
title: Deploy to Vercel
|
|
360
355
|
description: Learn how to deploy your Geistdocs site to Vercel
|
|
361
356
|
type: guide
|
|
362
|
-
summary: Deploy a Geistdocs site to Vercel with the required project settings
|
|
357
|
+
summary: Deploy a Geistdocs site to Vercel with the required project settings and environment variables.
|
|
363
358
|
url: /docs/deployment
|
|
364
359
|
source: apps/template/content/docs/deployment.mdx
|
|
365
360
|
prerequisites:
|
|
@@ -371,9 +366,12 @@ related:
|
|
|
371
366
|
|
|
372
367
|
# Deploy to Vercel
|
|
373
368
|
|
|
374
|
-
Deploy a Geistdocs site to Vercel as a Next.js app. Configure
|
|
369
|
+
Deploy a Geistdocs site to Vercel as a Next.js app. Configure environment variables and the production URL before shipping. Public `@vercel/geistdocs` projects require no private npm access.
|
|
375
370
|
|
|
376
|
-
Help me deploy this Geistdocs project to Vercel.
|
|
371
|
+
Help me deploy this Geistdocs project to Vercel. Review the selected package, scripts, environment variables, GitHub Actions authentication, and Vercel project settings. Verify private npm access only for `@vercel/geistdocs-private`.
|
|
372
|
+
|
|
373
|
+
> Note:
|
|
374
|
+
`@vercel/geistdocs-private` depends on the restricted `@vercel/geistcn` and `@vercel/geistcn-assets` packages. Use it only in internal environments such as `front`, where installs and deployments already have access. Public repositories, including Vercel-owned OSS projects, should use `@vercel/geistdocs`.
|
|
377
375
|
|
|
378
376
|
## Prerequisites
|
|
379
377
|
|
|
@@ -438,7 +436,7 @@ The Geistdocs site does not need Vertex credentials. The platform proxy authenti
|
|
|
438
436
|
---
|
|
439
437
|
|
|
440
438
|
---
|
|
441
|
-
title:
|
|
439
|
+
title: Migrate to Geistdocs
|
|
442
440
|
description: Migrate a Fumadocs or custom Geist docs site to package-backed Geistdocs
|
|
443
441
|
type: guide
|
|
444
442
|
summary: Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
|
|
@@ -453,14 +451,14 @@ related:
|
|
|
453
451
|
- /docs/agent-readiness
|
|
454
452
|
---
|
|
455
453
|
|
|
456
|
-
#
|
|
454
|
+
# Migrate to Geistdocs
|
|
457
455
|
|
|
458
456
|
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.
|
|
459
457
|
|
|
460
458
|
> Note:
|
|
461
|
-
|
|
459
|
+
Use `@vercel/geistdocs` by default, including in Vercel-owned OSS repositories. Use `@vercel/geistdocs-private` only in an internal environment that already has private npm access. See [Choose a Geistdocs package](/docs/packages).
|
|
462
460
|
|
|
463
|
-
Help me migrate this existing docs site to package-backed Geistdocs.
|
|
461
|
+
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.
|
|
464
462
|
|
|
465
463
|
## Before you migrate
|
|
466
464
|
|
|
@@ -487,7 +485,9 @@ Fix unrelated build failures first. A migration is safer when the starting point
|
|
|
487
485
|
|
|
488
486
|
## Install Geistdocs
|
|
489
487
|
|
|
490
|
-
|
|
488
|
+
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.
|
|
489
|
+
|
|
490
|
+
For an existing project, use your package manager directly:
|
|
491
491
|
|
|
492
492
|
```bash title="Terminal"
|
|
493
493
|
pnpm add --save-exact @vercel/geistdocs@latest
|
|
@@ -548,7 +548,8 @@ Replace imports according to this table:
|
|
|
548
548
|
|
|
549
549
|
| Previous Geistdocs import | Replacement |
|
|
550
550
|
| --- | --- |
|
|
551
|
-
| `components/badge`, `components/button`,
|
|
551
|
+
| `components/badge`, `components/button`, or `components/theme-switcher` | Keep the import package-backed. Geistdocs resolves these template primitives through the selected public or private provider. |
|
|
552
|
+
| `components/dialog`, `components/drawer`, `components/input`, `components/kbd`, `components/separator`, `components/sheet`, `components/spinner`, `components/textarea`, or `components/tooltip` | Import the matching component directly from `@vercel/geistcn/components/<name>` in approved private projects, or keep an application-owned public equivalent. |
|
|
552
553
|
| `components/switch` | Import toggle controls from `@vercel/geistcn/components/toggle`. |
|
|
553
554
|
| `components/sonner` | Use `Toasts` and `useToasts` from `@vercel/geistcn/components/toasts`. |
|
|
554
555
|
| `components/theme-aware-image` | Use `Image` from `@vercel/geistcn/components/image` with `srcLight` and `srcDark`. |
|
|
@@ -936,16 +937,10 @@ For a base-path application whose root page is documentation, add `"/"` to the s
|
|
|
936
937
|
Stable Geistdocs uses Tailwind CSS v4 with source entries for package components and related dependencies:
|
|
937
938
|
|
|
938
939
|
```css title="app/styles/geistdocs.css"
|
|
939
|
-
@import "
|
|
940
|
-
@import "fumadocs-ui/css/shadcn.css";
|
|
941
|
-
@import "fumadocs-ui/css/preset.css";
|
|
942
|
-
@import "tw-animate-css";
|
|
943
|
-
|
|
944
|
-
@source "../../node_modules/@vercel/geistdocs/dist/**/*.js";
|
|
945
|
-
@source "../../node_modules/streamdown/dist/*.js";
|
|
940
|
+
@import "@vercel/geistdocs/styles.css";
|
|
946
941
|
```
|
|
947
942
|
|
|
948
|
-
|
|
943
|
+
The package stylesheet owns the provider foundation, Geist tokens, typography, Fumadocs integration, and compiled runtime source discovery.
|
|
949
944
|
|
|
950
945
|
### Configure Tailwind CSS for the Geistcn canary
|
|
951
946
|
|
|
@@ -953,7 +948,6 @@ For the Geistcn canary, use the import order and narrow Geistcn source scan from
|
|
|
953
948
|
|
|
954
949
|
```css title="app/styles/geistdocs.css"
|
|
955
950
|
@import "@vercel/geistcn/tailwind.css";
|
|
956
|
-
@import "fumadocs-ui/css/shadcn.css";
|
|
957
951
|
@import "fumadocs-ui/css/preset.css";
|
|
958
952
|
@import "@vercel/geistdocs/theme.css";
|
|
959
953
|
@import "@vercel/geistcn/styles.css";
|
|
@@ -1006,6 +1000,64 @@ Check these URLs locally:
|
|
|
1006
1000
|
- Read [Agent readiness](/docs/agent-readiness) to configure `/agents.md` and `/.well-known/mcp.json` for AI agents.
|
|
1007
1001
|
|
|
1008
1002
|
|
|
1003
|
+
---
|
|
1004
|
+
|
|
1005
|
+
---
|
|
1006
|
+
title: Choose a Geistdocs package
|
|
1007
|
+
description: Choose between the public Geistdocs package and Vercel's private Geistcn-backed package
|
|
1008
|
+
type: guide
|
|
1009
|
+
summary: Use the public package by default and the private package only where restricted Vercel npm dependencies are already available.
|
|
1010
|
+
url: /docs/packages
|
|
1011
|
+
source: apps/template/content/docs/packages.mdx
|
|
1012
|
+
related:
|
|
1013
|
+
- /docs/getting-started
|
|
1014
|
+
- /docs/deployment
|
|
1015
|
+
- /docs/migration
|
|
1016
|
+
---
|
|
1017
|
+
|
|
1018
|
+
# Choose a Geistdocs package
|
|
1019
|
+
|
|
1020
|
+
Geistdocs ships as two packages built from the same runtime and template. They expose the same API and intentionally share the same visual design, layout, interactions, and product behavior. A site should look and work the same with either package; only the underlying primitive and asset provider differs.
|
|
1021
|
+
|
|
1022
|
+
> Note:
|
|
1023
|
+
`@vercel/geistdocs-private` is private because it directly uses the restricted `@vercel/geistcn` component library and `@vercel/geistcn-assets`—not simply because a repository is owned by Vercel. Vercel-owned OSS repositories are public and must use `@vercel/geistdocs`. The restricted packages contain Vercel product UI primitives and assets that are not distributed for public use. Giving external contributors access would expose the building blocks needed to closely reproduce Vercel product interfaces. Do not publish, redistribute, or expose the package, its dependencies, registry credentials, or downloaded artifacts outside internal environments authorized to use them.
|
|
1024
|
+
|
|
1025
|
+
| Package | Access | UI provider | Recommended use |
|
|
1026
|
+
| --- | --- | --- | --- |
|
|
1027
|
+
| `@vercel/geistdocs` | Public | Package-owned public primitives and vendored assets | Open-source repositories, external contributors, and all projects without private Vercel npm access |
|
|
1028
|
+
| `@vercel/geistdocs-private` | Private; restricted access | Restricted `@vercel/geistcn` components and `@vercel/geistcn-assets`; requires authenticated access to Vercel's private npm registry | Internal environments such as `front`; never public repositories or projects requiring external contributor access |
|
|
1029
|
+
|
|
1030
|
+
## Use the public package by default
|
|
1031
|
+
|
|
1032
|
+
Create a public Geistdocs project with:
|
|
1033
|
+
|
|
1034
|
+
```bash title="Terminal"
|
|
1035
|
+
pnpm dlx @vercel/geistdocs@latest init --name my-docs
|
|
1036
|
+
```
|
|
1037
|
+
|
|
1038
|
+
The generated project has no dependency or peer dependency on `@vercel/geistcn` or `@vercel/geistcn-assets`. Contributors can install it using normal public npm access.
|
|
1039
|
+
|
|
1040
|
+
## Use the private package inside Vercel
|
|
1041
|
+
|
|
1042
|
+
Create the private variant with:
|
|
1043
|
+
|
|
1044
|
+
```bash title="Terminal"
|
|
1045
|
+
pnpm dlx @vercel/geistdocs-private@latest init --name my-docs
|
|
1046
|
+
```
|
|
1047
|
+
|
|
1048
|
+
The private initializer asks whether the generated template will be used in a public repository. Answer **Yes** to generate the public `@vercel/geistdocs` variant without restricted dependencies. Answer **No** to keep `@vercel/geistdocs-private`.
|
|
1049
|
+
|
|
1050
|
+
The private package declares `@vercel/geistcn` and `@vercel/geistcn-assets` as peer dependencies. Both local development and deployment must be authenticated to Vercel's private npm registry. This makes it suitable only for internal environments such as `front`, where that access already exists and remains limited to authorized Vercel users.
|
|
1051
|
+
|
|
1052
|
+
Do not use the private package in a public repository or provide its registry access to external contributors. Use the public package whenever anyone outside Vercel needs to install, build, or contribute to the project—even if the site itself is deployed on Vercel.
|
|
1053
|
+
|
|
1054
|
+
## Keep package identities consistent
|
|
1055
|
+
|
|
1056
|
+
The CLI writes the package that initialized the project into every generated import and dependency. Keep one Geistdocs package throughout the app and update it with that package's CLI. Do not install both variants or combine imports from them.
|
|
1057
|
+
|
|
1058
|
+
Switching variants should require only changing package identity and provider-specific dependency metadata. Application content, configuration, route adapters, and Geistdocs APIs remain the same.
|
|
1059
|
+
|
|
1060
|
+
|
|
1009
1061
|
---
|
|
1010
1062
|
|
|
1011
1063
|
---
|
|
@@ -1407,7 +1459,9 @@ related:
|
|
|
1407
1459
|
|
|
1408
1460
|
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.
|
|
1409
1461
|
|
|
1410
|
-
Help me write a Geistdocs MDX page. Use this page as a syntax reference and
|
|
1462
|
+
Help me write a Geistdocs MDX page. Use this page as a syntax reference and
|
|
1463
|
+
create an example page with frontmatter, headings, links, a code block, a
|
|
1464
|
+
`Callout`, and a `CopyPrompt` component.
|
|
1411
1465
|
|
|
1412
1466
|
## Frontmatter
|
|
1413
1467
|
|
|
@@ -1459,11 +1513,17 @@ Headings automatically generate anchor links for navigation and deep linking.
|
|
|
1459
1513
|
|
|
1460
1514
|
Create unordered lists with `-`, `*`, or `+`:
|
|
1461
1515
|
|
|
1462
|
-
|
|
1463
|
-
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1516
|
+
```md
|
|
1517
|
+
- Install the required packages
|
|
1518
|
+
- Configure your project
|
|
1519
|
+
- Start the development server
|
|
1520
|
+
```
|
|
1521
|
+
|
|
1522
|
+
This renders as:
|
|
1523
|
+
|
|
1524
|
+
- Install the required packages
|
|
1525
|
+
- Configure your project
|
|
1526
|
+
- Start the development server
|
|
1467
1527
|
|
|
1468
1528
|
Create ordered lists with numbers:
|
|
1469
1529
|
|
|
@@ -1471,11 +1531,99 @@ Create ordered lists with numbers:
|
|
|
1471
1531
|
2. Second step
|
|
1472
1532
|
3. Third step
|
|
1473
1533
|
|
|
1534
|
+
### Steps
|
|
1535
|
+
|
|
1536
|
+
Headings that start with a number, such as `### 1. Install the CLI`, render as a numbered step list with a counter beside each heading. See [Steps](/docs/components/steps) for the grouping rules and the `Steps` and `Step` components.
|
|
1537
|
+
|
|
1474
1538
|
### Blockquotes
|
|
1475
1539
|
|
|
1476
1540
|
Use `>` to create blockquotes:
|
|
1477
1541
|
|
|
1478
|
-
>
|
|
1542
|
+
> **Watch:** Learn more about how to use `next/image` → [YouTube (9 minutes)](https://youtu.be/IU_qq_c_lKA).
|
|
1543
|
+
|
|
1544
|
+
### Callouts
|
|
1545
|
+
|
|
1546
|
+
Use `<Callout>` for a highlighted informational note:
|
|
1547
|
+
|
|
1548
|
+
```mdx
|
|
1549
|
+
<Callout>This is automatically set when deploying to Vercel.</Callout>
|
|
1550
|
+
```
|
|
1551
|
+
|
|
1552
|
+
This renders as:
|
|
1553
|
+
|
|
1554
|
+
> This is automatically set when deploying to Vercel.
|
|
1555
|
+
|
|
1556
|
+
Callouts can also contain a title and lists:
|
|
1557
|
+
|
|
1558
|
+
> Note:
|
|
1559
|
+
- The `App Router` uses [React canary
|
|
1560
|
+
releases](https://react.dev/blog/2023/05/03/react-canaries) built-in, which
|
|
1561
|
+
include all the stable React 19 changes, as well as newer features being
|
|
1562
|
+
validated in frameworks, but you should still declare react and react-dom in
|
|
1563
|
+
package.json for tooling and ecosystem compatibility.
|
|
1564
|
+
- The `Pages Router` uses the React version from your `package.json`.
|
|
1565
|
+
|
|
1566
|
+
Callouts support rich inline Markdown, including code, emphasis, and links:
|
|
1567
|
+
|
|
1568
|
+
```mdx
|
|
1569
|
+
<Callout title="Good to know">
|
|
1570
|
+
Global styles can be imported into any layout, page, or component inside the
|
|
1571
|
+
`app` directory. However, since Next.js uses React's built-in support for
|
|
1572
|
+
stylesheets to integrate with Suspense, this currently does not remove
|
|
1573
|
+
stylesheets as you navigate between routes which can lead to conflicts. We
|
|
1574
|
+
recommend using global styles for _truly global_ CSS (like Tailwind's base
|
|
1575
|
+
styles), [Tailwind CSS](https://tailwindcss.com) for component styling, and
|
|
1576
|
+
[CSS Modules](https://nextjs.org/docs/app/getting-started/css#css-modules) for
|
|
1577
|
+
custom scoped CSS when needed.
|
|
1578
|
+
</Callout>
|
|
1579
|
+
```
|
|
1580
|
+
|
|
1581
|
+
This renders as:
|
|
1582
|
+
|
|
1583
|
+
> Note:
|
|
1584
|
+
Global styles can be imported into any layout, page, or component inside the
|
|
1585
|
+
`app` directory. However, since Next.js uses React's built-in support for
|
|
1586
|
+
stylesheets to integrate with Suspense, this currently does not remove
|
|
1587
|
+
stylesheets as you navigate between routes which can lead to conflicts. We
|
|
1588
|
+
recommend using global styles for _truly global_ CSS (like Tailwind's base
|
|
1589
|
+
styles), [Tailwind CSS](https://tailwindcss.com) for component styling, and
|
|
1590
|
+
[CSS Modules](https://nextjs.org/docs/app/getting-started/css#css-modules) for
|
|
1591
|
+
custom scoped CSS when needed.
|
|
1592
|
+
|
|
1593
|
+
### Copy Prompts
|
|
1594
|
+
|
|
1595
|
+
Short prompts render in full without an expansion control:
|
|
1596
|
+
|
|
1597
|
+
```mdx
|
|
1598
|
+
<CopyPrompt text="Summarize this documentation page and list the key concepts.">
|
|
1599
|
+
Summarize this documentation page and list the key concepts.
|
|
1600
|
+
</CopyPrompt>
|
|
1601
|
+
```
|
|
1602
|
+
|
|
1603
|
+
This renders as:
|
|
1604
|
+
|
|
1605
|
+
Summarize this documentation page and list the key concepts.
|
|
1606
|
+
|
|
1607
|
+
Long prompts initially show a preview with a **Show more** control:
|
|
1608
|
+
|
|
1609
|
+
```mdx
|
|
1610
|
+
<CopyPrompt collapsible text="Write a detailed migration plan for this project.">
|
|
1611
|
+
Write a detailed migration plan for this project. Include prerequisites,
|
|
1612
|
+
implementation steps, validation, rollback guidance, and common pitfalls.
|
|
1613
|
+
</CopyPrompt>
|
|
1614
|
+
```
|
|
1615
|
+
|
|
1616
|
+
Set the boolean `collapsible` prop when the prompt should initially render as a
|
|
1617
|
+
two-line preview. This renders as:
|
|
1618
|
+
|
|
1619
|
+
Review this Geistdocs project in detail. Explain how the `@vercel/geistdocs`
|
|
1620
|
+
package, application layouts, local adapter files, source configuration,
|
|
1621
|
+
`content/docs` directory, navigation metadata, MDX components, syntax
|
|
1622
|
+
highlighting, search routes, and deployment configuration work together.
|
|
1623
|
+
Then identify the safest first files to edit, describe the effect of each
|
|
1624
|
+
change, call out common mistakes, and propose a step-by-step plan for
|
|
1625
|
+
customizing the documentation site without breaking routing, generated
|
|
1626
|
+
Markdown, or accessibility behavior.
|
|
1479
1627
|
|
|
1480
1628
|
### Links
|
|
1481
1629
|
|
|
@@ -1484,6 +1632,25 @@ Create links with `[text](url)`:
|
|
|
1484
1632
|
- [External link](https://vercel.com)
|
|
1485
1633
|
- [Internal link](/docs/getting-started)
|
|
1486
1634
|
|
|
1635
|
+
Use an absolute `https://` or `http://` URL for an external destination. Use a
|
|
1636
|
+
root-relative path beginning with `/` for an internal link. Both use the same
|
|
1637
|
+
visual styling:
|
|
1638
|
+
|
|
1639
|
+
```md
|
|
1640
|
+
[External link](https://vercel.com)
|
|
1641
|
+
[Internal link](/docs/getting-started)
|
|
1642
|
+
```
|
|
1643
|
+
|
|
1644
|
+
Links can also contain inline code:
|
|
1645
|
+
|
|
1646
|
+
```md
|
|
1647
|
+
Run independent requests in parallel with [`Promise.all`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/all).
|
|
1648
|
+
```
|
|
1649
|
+
|
|
1650
|
+
This renders as:
|
|
1651
|
+
|
|
1652
|
+
Run independent requests in parallel with [`Promise.all`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/all).
|
|
1653
|
+
|
|
1487
1654
|
### Images
|
|
1488
1655
|
|
|
1489
1656
|
Add images with ``:
|
|
@@ -1492,6 +1659,44 @@ Add images with ``:
|
|
|
1492
1659
|

|
|
1493
1660
|
```
|
|
1494
1661
|
|
|
1662
|
+
Use `<Image>` when an image needs the standard documentation presentation and
|
|
1663
|
+
an optional description. It uses Geistcn's image component without a lightbox
|
|
1664
|
+
or other interaction:
|
|
1665
|
+
|
|
1666
|
+
```mdx
|
|
1667
|
+
<Image
|
|
1668
|
+
alt="Deployment graph"
|
|
1669
|
+
caption="Requests move from the edge to the selected region."
|
|
1670
|
+
height={480}
|
|
1671
|
+
src="/deployment-graph.png"
|
|
1672
|
+
width={800}
|
|
1673
|
+
/>
|
|
1674
|
+
```
|
|
1675
|
+
|
|
1676
|
+
This renders as:
|
|
1677
|
+
|
|
1678
|
+
<Image
|
|
1679
|
+
alt="Navigation Inspector showing a loading shell for a page load"
|
|
1680
|
+
caption="The Navigation Inspector paused on a page load."
|
|
1681
|
+
height={389}
|
|
1682
|
+
srcDark="https://h8DxKfmAPhn8O0p3.public.blob.vercel-storage.com/docs/dark/inspector-load.png"
|
|
1683
|
+
srcLight="https://h8DxKfmAPhn8O0p3.public.blob.vercel-storage.com/docs/light/inspector-load.png"
|
|
1684
|
+
width={472}
|
|
1685
|
+
/>
|
|
1686
|
+
|
|
1687
|
+
For theme-aware images, provide both sources:
|
|
1688
|
+
|
|
1689
|
+
```mdx
|
|
1690
|
+
<Image
|
|
1691
|
+
alt="Deployment graph"
|
|
1692
|
+
caption="Requests move from the edge to the selected region."
|
|
1693
|
+
height={480}
|
|
1694
|
+
srcDark="/deployment-graph-dark.png"
|
|
1695
|
+
srcLight="/deployment-graph-light.png"
|
|
1696
|
+
width={800}
|
|
1697
|
+
/>
|
|
1698
|
+
```
|
|
1699
|
+
|
|
1495
1700
|
## GitHub Flavored Markdown
|
|
1496
1701
|
|
|
1497
1702
|
Geistdocs supports GFM extensions including tables, task lists, and autolinks.
|
|
@@ -1516,6 +1721,16 @@ This renders as:
|
|
|
1516
1721
|
| GFM | GitHub extensions | Supported |
|
|
1517
1722
|
| MDX | JSX in Markdown | Supported |
|
|
1518
1723
|
|
|
1724
|
+
Tables can also include inline code, as commonly used for file references:
|
|
1725
|
+
|
|
1726
|
+
| File | Description |
|
|
1727
|
+
| -------------------- | ------------------------------------------------ |
|
|
1728
|
+
| `next.config.js` | Configuration file for Next.js |
|
|
1729
|
+
| `package.json` | Project dependencies and scripts |
|
|
1730
|
+
| `instrumentation.ts` | OpenTelemetry and instrumentation file |
|
|
1731
|
+
| `.env.local` | Local environment variables |
|
|
1732
|
+
| `tsconfig.json` | Configuration file for TypeScript |
|
|
1733
|
+
|
|
1519
1734
|
### Task Lists
|
|
1520
1735
|
|
|
1521
1736
|
Create interactive task lists:
|
|
@@ -1588,6 +1803,78 @@ export const Button = ({ children }) => {
|
|
|
1588
1803
|
};
|
|
1589
1804
|
```
|
|
1590
1805
|
|
|
1806
|
+
### Tabs and switchers
|
|
1807
|
+
|
|
1808
|
+
Use consecutive fences with `tab` metadata for code tabs that expose every
|
|
1809
|
+
option at once:
|
|
1810
|
+
|
|
1811
|
+
````md
|
|
1812
|
+
```ts tab="TypeScript" title="example.ts"
|
|
1813
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1814
|
+
```
|
|
1815
|
+
|
|
1816
|
+
```js tab="JavaScript" title="example.js"
|
|
1817
|
+
export const greeting = "Hello from JavaScript";
|
|
1818
|
+
```
|
|
1819
|
+
````
|
|
1820
|
+
|
|
1821
|
+
This renders as:
|
|
1822
|
+
|
|
1823
|
+
```ts tab="TypeScript" title="example.ts"
|
|
1824
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1825
|
+
```
|
|
1826
|
+
|
|
1827
|
+
```js tab="JavaScript" title="example.js"
|
|
1828
|
+
export const greeting = "Hello from JavaScript";
|
|
1829
|
+
```
|
|
1830
|
+
|
|
1831
|
+
Wrap the same fences in `<CodeBlockTabs compact>` to move the selector into the
|
|
1832
|
+
code-block header:
|
|
1833
|
+
|
|
1834
|
+
````mdx
|
|
1835
|
+
<CompactCodeBlockTabs defaultValue="TypeScript">
|
|
1836
|
+
<CodeBlockTabsList>
|
|
1837
|
+
<CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
|
|
1838
|
+
<CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
|
|
1839
|
+
</CodeBlockTabsList>
|
|
1840
|
+
<CodeBlockTab value="TypeScript">
|
|
1841
|
+
```ts title="example.ts"
|
|
1842
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1843
|
+
```
|
|
1844
|
+
</CodeBlockTab>
|
|
1845
|
+
<CodeBlockTab value="JavaScript">
|
|
1846
|
+
```js title="example.js"
|
|
1847
|
+
export const greeting = "Hello from JavaScript";
|
|
1848
|
+
```
|
|
1849
|
+
</CodeBlockTab>
|
|
1850
|
+
</CompactCodeBlockTabs>
|
|
1851
|
+
````
|
|
1852
|
+
|
|
1853
|
+
This renders as:
|
|
1854
|
+
|
|
1855
|
+
<CompactCodeBlockTabs defaultValue="TypeScript">
|
|
1856
|
+
<CodeBlockTabsList>
|
|
1857
|
+
<CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
|
|
1858
|
+
<CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
|
|
1859
|
+
</CodeBlockTabsList>
|
|
1860
|
+
<CodeBlockTab value="TypeScript">
|
|
1861
|
+
```ts title="example.ts"
|
|
1862
|
+
export const greeting: string = "Hello from TypeScript";
|
|
1863
|
+
```
|
|
1864
|
+
</CodeBlockTab>
|
|
1865
|
+
<CodeBlockTab value="JavaScript">
|
|
1866
|
+
```js title="example.js"
|
|
1867
|
+
export const greeting = "Hello from JavaScript";
|
|
1868
|
+
```
|
|
1869
|
+
</CodeBlockTab>
|
|
1870
|
+
</CompactCodeBlockTabs>
|
|
1871
|
+
|
|
1872
|
+
When migrating an existing site such as next-site, translate adjacent
|
|
1873
|
+
`switcher` fences to `tab="TypeScript"` and `tab="JavaScript"`, then wrap the
|
|
1874
|
+
pair with `<CodeBlockTabs compact>`. Import `@vercel/geistdocs/styles.css` (or
|
|
1875
|
+
`theme.css` with the documented Geist dependencies) so Tailwind scans the
|
|
1876
|
+
package's compiled components and emits the tab layout utilities.
|
|
1877
|
+
|
|
1591
1878
|
### Framework icons
|
|
1592
1879
|
|
|
1593
1880
|
Append `#<framework>` to the title to show a framework logo instead of the
|
|
@@ -1596,22 +1883,22 @@ values are `#next` / `#nextjs` and `#svelte` / `#sveltekit`:
|
|
|
1596
1883
|
|
|
1597
1884
|
````md
|
|
1598
1885
|
```ts title="flags.ts#next"
|
|
1599
|
-
import { flag } from
|
|
1886
|
+
import { flag } from "flags/next";
|
|
1600
1887
|
```
|
|
1601
1888
|
|
|
1602
1889
|
```ts title="flags.ts#svelte"
|
|
1603
|
-
import { flag } from
|
|
1890
|
+
import { flag } from "flags/sveltekit";
|
|
1604
1891
|
```
|
|
1605
1892
|
````
|
|
1606
1893
|
|
|
1607
1894
|
This renders as:
|
|
1608
1895
|
|
|
1609
1896
|
```ts title="flags.ts#next"
|
|
1610
|
-
import { flag } from
|
|
1897
|
+
import { flag } from "flags/next";
|
|
1611
1898
|
```
|
|
1612
1899
|
|
|
1613
1900
|
```ts title="flags.ts#svelte"
|
|
1614
|
-
import { flag } from
|
|
1901
|
+
import { flag } from "flags/sveltekit";
|
|
1615
1902
|
```
|
|
1616
1903
|
|
|
1617
1904
|
### Line Numbers
|
|
@@ -2100,7 +2387,6 @@ Each version can define an `icon` to override the default current/previous versi
|
|
|
2100
2387
|
Use `GeistdocsRouteSelect` for framework, product, or route switchers that should not use version-specific labels:
|
|
2101
2388
|
|
|
2102
2389
|
```tsx
|
|
2103
|
-
import { LogoNextjs, LogoSvelteKit } from "@vercel/geistdocs/assets/logos";
|
|
2104
2390
|
import { GeistdocsRouteSelect } from "@vercel/geistdocs/versions";
|
|
2105
2391
|
|
|
2106
2392
|
<GeistdocsRouteSelect
|
|
@@ -2111,14 +2397,14 @@ import { GeistdocsRouteSelect } from "@vercel/geistdocs/versions";
|
|
|
2111
2397
|
id: "nextjs",
|
|
2112
2398
|
label: "Next.js",
|
|
2113
2399
|
description: "React framework",
|
|
2114
|
-
icon: <
|
|
2400
|
+
icon: <span aria-hidden>N</span>,
|
|
2115
2401
|
href: "/:path*",
|
|
2116
2402
|
},
|
|
2117
2403
|
{
|
|
2118
2404
|
id: "sveltekit",
|
|
2119
2405
|
label: "SvelteKit",
|
|
2120
2406
|
description: "Svelte framework",
|
|
2121
|
-
icon: <
|
|
2407
|
+
icon: <span aria-hidden>S</span>,
|
|
2122
2408
|
routePrefix: "/sveltekit",
|
|
2123
2409
|
href: "/sveltekit/:path*",
|
|
2124
2410
|
},
|
|
@@ -2414,9 +2700,15 @@ export const config = {
|
|
|
2414
2700
|
|
|
2415
2701
|
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.
|
|
2416
2702
|
|
|
2703
|
+
## Negotiate HTML and Markdown
|
|
2704
|
+
|
|
2705
|
+
Explicit `Accept` preferences determine the response for extensionless mapped URLs. Geistdocs recognizes `text/markdown`, `text/x-markdown`, and `text/plain` as Markdown media types and compares their quality and specificity with HTML media types. An explicit HTML preference or Markdown with `q=0` continues to the app's normal HTML handling.
|
|
2706
|
+
|
|
2707
|
+
Agent detection acts as a fallback when `Accept` is missing or does not distinguish HTML from Markdown. Explicit `.md` and `.mdx` URLs always request Markdown, even when the client usually prefers HTML. Geistdocs does not return `406 Not Acceptable` when Markdown is not selected.
|
|
2708
|
+
|
|
2417
2709
|
## Recover unmatched Markdown requests
|
|
2418
2710
|
|
|
2419
|
-
`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
|
|
2711
|
+
`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 an eligible Markdown `GET` or `HEAD` request matches neither a Markdown mapping nor an application route. Requests that prefer HTML keep the app's normal HTML recovery, including requests from detected agents.
|
|
2420
2712
|
|
|
2421
2713
|
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.
|
|
2422
2714
|
|
|
@@ -2857,7 +3149,7 @@ related:
|
|
|
2857
3149
|
|
|
2858
3150
|
# .md Extension
|
|
2859
3151
|
|
|
2860
|
-
Geistdocs lets AI tools and language models access documentation pages as plain Markdown. Append `.md` or `.mdx` to a documentation URL to get the
|
|
3152
|
+
Geistdocs lets AI tools and language models access documentation pages as plain Markdown. Append `.md` or `.mdx` to a documentation URL to get the page content with presentation-only MDX components removed.
|
|
2861
3153
|
|
|
2862
3154
|
Help me test raw Markdown routes in this Geistdocs project. Fetch a docs page with `.mdx` appended, compare it to the rendered page, and explain how AI tools can use it.
|
|
2863
3155
|
|
|
@@ -2877,8 +3169,8 @@ https://yourdomain.com/docs/getting-started.mdx
|
|
|
2877
3169
|
|
|
2878
3170
|
The `.mdx` version returns:
|
|
2879
3171
|
|
|
2880
|
-
-
|
|
2881
|
-
- The full
|
|
3172
|
+
- Frontmatter with the canonical page URL, docs index, and last-updated date when available
|
|
3173
|
+
- The full page content as plain Markdown
|
|
2882
3174
|
- No HTML, styling, or navigation
|
|
2883
3175
|
|
|
2884
3176
|
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`.
|
|
@@ -2927,11 +3219,30 @@ The response includes:
|
|
|
2927
3219
|
|
|
2928
3220
|
- Content-Type: `text/markdown`
|
|
2929
3221
|
- `Link: <canonical page URL>; rel="canonical"` for resolved pages
|
|
2930
|
-
-
|
|
2931
|
-
-
|
|
3222
|
+
- Frontmatter with page metadata and discovery links
|
|
3223
|
+
- Page content with presentation-only MDX components removed
|
|
2932
3224
|
|
|
2933
3225
|
All MDX components are processed and converted to plain Markdown equivalents.
|
|
2934
3226
|
|
|
3227
|
+
### Customize frontmatter
|
|
3228
|
+
|
|
3229
|
+
Geistdocs generates `title`, `description`, `url`, `docs_index`, and `lastUpdated` when their values are available, along with supported page frontmatter such as `prerequisites` and `related`. Add product-specific fields or override defaults with the source `markdown.frontmatter` hook:
|
|
3230
|
+
|
|
3231
|
+
```ts title="lib/geistdocs/source.ts"
|
|
3232
|
+
export const geistdocsSource = createSource({
|
|
3233
|
+
config,
|
|
3234
|
+
docs,
|
|
3235
|
+
markdown: {
|
|
3236
|
+
frontmatter: (defaults) => ({
|
|
3237
|
+
docs_index: "/docs/llms.txt",
|
|
3238
|
+
version: "16.3.4",
|
|
3239
|
+
}),
|
|
3240
|
+
},
|
|
3241
|
+
});
|
|
3242
|
+
```
|
|
3243
|
+
|
|
3244
|
+
The callback returns only additions and overrides; Geistdocs keeps the remaining generated fields from `defaults`.
|
|
3245
|
+
|
|
2935
3246
|
## Missing documentation pages
|
|
2936
3247
|
|
|
2937
3248
|
When a Markdown request does not match a page, Geistdocs returns an agent-readable `Page Not Found` response. It compares the requested path with visible page paths and titles, then links up to five likely matches with their descriptions. If no match is useful, the response links to `/llms.txt` instead.
|
|
@@ -2955,7 +3266,7 @@ Set `notFound.getPageMarkdownUrl` as well when suggested pages use a custom app-
|
|
|
2955
3266
|
|
|
2956
3267
|
### Unmatched application paths
|
|
2957
3268
|
|
|
2958
|
-
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
|
|
3269
|
+
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 `GET` and `HEAD` requests receive a concise Markdown 404 when the client prefers Markdown or when agent detection applies as a fallback. An explicit HTML preference keeps the app's normal HTML recovery.
|
|
2959
3270
|
|
|
2960
3271
|
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.
|
|
2961
3272
|
|
|
@@ -3164,7 +3475,6 @@ Users can open the chat interface at any time by:
|
|
|
3164
3475
|
Once open, users can:
|
|
3165
3476
|
|
|
3166
3477
|
- Ask questions about any part of your documentation
|
|
3167
|
-
- Expand the desktop panel to a full-screen view for wide responses and code blocks
|
|
3168
3478
|
- Upload files or images for context
|
|
3169
3479
|
- View AI-powered search results from your docs
|
|
3170
3480
|
- Get step-by-step guidance on complex topics
|
|
@@ -3217,7 +3527,7 @@ In this mode, Geistdocs uses the local `search_docs` tool during the AI SDK `str
|
|
|
3217
3527
|
|
|
3218
3528
|
#### Choose a model
|
|
3219
3529
|
|
|
3220
|
-
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-
|
|
3530
|
+
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`.
|
|
3221
3531
|
|
|
3222
3532
|
```ts title="app/api/chat/route.ts"
|
|
3223
3533
|
import { createChatRoute } from "@vercel/geistdocs/routes/chat";
|
|
@@ -3321,14 +3631,14 @@ Conversations are automatically saved to the browser's IndexedDB, providing:
|
|
|
3321
3631
|
|
|
3322
3632
|
The chat interface adapts to different screen sizes:
|
|
3323
3633
|
|
|
3324
|
-
- **Desktop**: Slides in from the right side as a sidebar panel
|
|
3634
|
+
- **Desktop**: Slides in from the right side as a sidebar panel
|
|
3325
3635
|
- **Mobile**: Opens as a bottom drawer.
|
|
3326
3636
|
|
|
3327
3637
|
## Configuration
|
|
3328
3638
|
|
|
3329
3639
|
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.
|
|
3330
3640
|
|
|
3331
|
-
In default AI Gateway mode, Geistdocs uses `openai/gpt-
|
|
3641
|
+
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.
|
|
3332
3642
|
|
|
3333
3643
|
## Suggested Prompts
|
|
3334
3644
|
|
|
@@ -3539,7 +3849,7 @@ Geistdocs applies a color for each method:
|
|
|
3539
3849
|
| `PUT`, `PATCH` | Amber |
|
|
3540
3850
|
| `DEL`, `DELETE` | Red |
|
|
3541
3851
|
|
|
3542
|
-
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.
|
|
3852
|
+
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.
|
|
3543
3853
|
|
|
3544
3854
|
## Add links to the navigation
|
|
3545
3855
|
|
|
@@ -4299,6 +4609,139 @@ lastModified: 2025-11-12
|
|
|
4299
4609
|
Git commit dates require full git history at build time. On Vercel, set the `VERCEL_DEEP_CLONE=true` environment variable so builds clone the full history. Read [Last modified dates](/docs/configuration#last-modified-dates) for the full resolution order.
|
|
4300
4610
|
|
|
4301
4611
|
|
|
4612
|
+
---
|
|
4613
|
+
|
|
4614
|
+
---
|
|
4615
|
+
title: Steps
|
|
4616
|
+
description: Render numbered step-by-step instructions from Markdown headings or the Steps and Step components
|
|
4617
|
+
type: reference
|
|
4618
|
+
summary: Write consecutive headings that start with a number, such as "### 1. Install", to render a numbered step list. The Steps and Step components cover cases where a heading must be wrapped in another component.
|
|
4619
|
+
url: /docs/components/steps
|
|
4620
|
+
source: apps/template/content/docs/components/steps.mdx
|
|
4621
|
+
prerequisites:
|
|
4622
|
+
- /docs/syntax
|
|
4623
|
+
related:
|
|
4624
|
+
- /docs/syntax
|
|
4625
|
+
- /docs/table-of-contents
|
|
4626
|
+
---
|
|
4627
|
+
|
|
4628
|
+
# Steps
|
|
4629
|
+
|
|
4630
|
+
Steps render sequential instructions as a numbered list with a counter beside each step heading. You write them as plain Markdown headings, so a page needs no imports and stays readable in Markdown output.
|
|
4631
|
+
|
|
4632
|
+
## Write steps as numbered headings
|
|
4633
|
+
|
|
4634
|
+
Start each step heading with a number, a period, and a space. Consecutive headings at the same depth that follow this pattern become one step list.
|
|
4635
|
+
|
|
4636
|
+
````md
|
|
4637
|
+
## Deploy the project
|
|
4638
|
+
|
|
4639
|
+
### 1. Install the CLI
|
|
4640
|
+
|
|
4641
|
+
Install the Vercel CLI globally.
|
|
4642
|
+
|
|
4643
|
+
```bash
|
|
4644
|
+
pnpm add -g vercel
|
|
4645
|
+
```
|
|
4646
|
+
|
|
4647
|
+
### 2. Link the project
|
|
4648
|
+
|
|
4649
|
+
Run `vercel link` in the project directory and pick the team and project.
|
|
4650
|
+
|
|
4651
|
+
### 3. Deploy
|
|
4652
|
+
|
|
4653
|
+
Run `vercel deploy` to create a preview deployment.
|
|
4654
|
+
|
|
4655
|
+
## Next section
|
|
4656
|
+
````
|
|
4657
|
+
|
|
4658
|
+
This renders as:
|
|
4659
|
+
|
|
4660
|
+
### 1. Install the CLI
|
|
4661
|
+
|
|
4662
|
+
Install the Vercel CLI globally.
|
|
4663
|
+
|
|
4664
|
+
```bash
|
|
4665
|
+
pnpm add -g vercel
|
|
4666
|
+
```
|
|
4667
|
+
|
|
4668
|
+
### 2. Link the project
|
|
4669
|
+
|
|
4670
|
+
Run `vercel link` in the project directory and pick the team and project.
|
|
4671
|
+
|
|
4672
|
+
### 3. Deploy
|
|
4673
|
+
|
|
4674
|
+
Run `vercel deploy` to create a preview deployment.
|
|
4675
|
+
|
|
4676
|
+
## How numbering and anchors work
|
|
4677
|
+
|
|
4678
|
+
Geistdocs removes the `1. ` prefix from the heading text at build time and draws the number with a CSS counter. As a result:
|
|
4679
|
+
|
|
4680
|
+
- The table of contents shows `Install the CLI`, not `1. Install the CLI`.
|
|
4681
|
+
- The heading anchor is `#install-the-cli`, so renumbering steps does not break links.
|
|
4682
|
+
- Custom anchors written as `### 1. Install the CLI [#install]` keep working.
|
|
4683
|
+
- Markdown routes and `llms.txt` output numbered headings, such as `### 1. Install the CLI`, which read naturally for agents.
|
|
4684
|
+
|
|
4685
|
+
The numbers you write are only used to detect steps. Geistdocs always counts from 1, so `### 4. Deploy` at the start of a list renders as step 1.
|
|
4686
|
+
|
|
4687
|
+
## Rules for grouping steps
|
|
4688
|
+
|
|
4689
|
+
Geistdocs groups headings into a step list using these rules:
|
|
4690
|
+
|
|
4691
|
+
| Situation | Result |
|
|
4692
|
+
| --- | --- |
|
|
4693
|
+
| Consecutive numbered headings at the same depth | One step list |
|
|
4694
|
+
| A deeper heading inside a step, such as `#### Options` under `### 2. Configure` | Part of the current step |
|
|
4695
|
+
| A heading at the same or shallower depth without a number prefix | Ends the step list |
|
|
4696
|
+
| A numbered heading where inline code or a link immediately follows the number, such as `` ### 1. `vercel login` `` | Not detected as a step; move a word before the code, such as `` ### 1. Run `vercel login` `` |
|
|
4697
|
+
|
|
4698
|
+
Paragraphs, lists, code blocks, callouts, and images between two step headings belong to the earlier step.
|
|
4699
|
+
|
|
4700
|
+
## Use the Steps and Step components
|
|
4701
|
+
|
|
4702
|
+
Use the components when a step heading has to be wrapped in another component, for example a framework switcher, and the heading pattern cannot be detected. Both components are in the default MDX component map and are exported from the selected package's `components/steps` subpath.
|
|
4703
|
+
|
|
4704
|
+
```mdx
|
|
4705
|
+
<Steps>
|
|
4706
|
+
<Step>
|
|
4707
|
+
### Install the package
|
|
4708
|
+
|
|
4709
|
+
Run the install command for your package manager.
|
|
4710
|
+
</Step>
|
|
4711
|
+
<Step>
|
|
4712
|
+
### Configure the project
|
|
4713
|
+
|
|
4714
|
+
Add the configuration file to the project root.
|
|
4715
|
+
</Step>
|
|
4716
|
+
</Steps>
|
|
4717
|
+
```
|
|
4718
|
+
|
|
4719
|
+
This renders as:
|
|
4720
|
+
|
|
4721
|
+
<Steps>
|
|
4722
|
+
<Step>
|
|
4723
|
+
### Install the package
|
|
4724
|
+
|
|
4725
|
+
Run the install command for your package manager.
|
|
4726
|
+
</Step>
|
|
4727
|
+
<Step>
|
|
4728
|
+
### Configure the project
|
|
4729
|
+
|
|
4730
|
+
Add the configuration file to the project root.
|
|
4731
|
+
</Step>
|
|
4732
|
+
</Steps>
|
|
4733
|
+
|
|
4734
|
+
Do not add a number prefix to headings inside `Step`. The component draws the counter, and a prefix would create a nested step list.
|
|
4735
|
+
|
|
4736
|
+
### Props
|
|
4737
|
+
|
|
4738
|
+
`Steps` and `Step` accept the standard `div` attributes. Both forward `className`, which is merged with the `fd-steps` and `fd-step` classes that carry the counter styling.
|
|
4739
|
+
|
|
4740
|
+
## Markdown output
|
|
4741
|
+
|
|
4742
|
+
In `.md` routes and `llms.txt`, each step list becomes plain numbered headings, such as `### 1. Install the CLI`, followed by the step content. This applies to steps written as headings and to steps written with `Steps` and `Step`, so agents read the same sequence without the wrapper markup.
|
|
4743
|
+
|
|
4744
|
+
|
|
4302
4745
|
---
|
|
4303
4746
|
|
|
4304
4747
|
---
|
|
@@ -4364,69 +4807,6 @@ On mobile, Geistdocs replaces the sidebar outline with a compact menu in the pag
|
|
|
4364
4807
|
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.
|
|
4365
4808
|
|
|
4366
4809
|
|
|
4367
|
-
---
|
|
4368
|
-
|
|
4369
|
-
---
|
|
4370
|
-
title: Theme-Aware Image
|
|
4371
|
-
description: Display different images based on the user's light or dark theme preference
|
|
4372
|
-
type: reference
|
|
4373
|
-
summary: A component that swaps images based on the active theme, built on top of Next.js Image.
|
|
4374
|
-
url: /docs/theme-aware-image
|
|
4375
|
-
source: apps/template/content/docs/theme-aware-image.mdx
|
|
4376
|
-
prerequisites:
|
|
4377
|
-
- /docs/getting-started
|
|
4378
|
-
- /docs/provider
|
|
4379
|
-
related:
|
|
4380
|
-
- /docs/syntax
|
|
4381
|
-
- /docs/configuration
|
|
4382
|
-
---
|
|
4383
|
-
|
|
4384
|
-
# Theme-Aware Image
|
|
4385
|
-
|
|
4386
|
-
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.
|
|
4387
|
-
|
|
4388
|
-
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.
|
|
4389
|
-
|
|
4390
|
-
## Usage
|
|
4391
|
-
|
|
4392
|
-
Import the component and pass a `src` object with `light` and `dark` variants:
|
|
4393
|
-
|
|
4394
|
-
```tsx
|
|
4395
|
-
import { ThemeAwareImage } from "@vercel/geistdocs/components/theme-aware-image";
|
|
4396
|
-
|
|
4397
|
-
<ThemeAwareImage
|
|
4398
|
-
src={{
|
|
4399
|
-
light: "/images/diagram-light.png",
|
|
4400
|
-
dark: "/images/diagram-dark.png",
|
|
4401
|
-
}}
|
|
4402
|
-
alt="Architecture diagram"
|
|
4403
|
-
width={800}
|
|
4404
|
-
height={400}
|
|
4405
|
-
/>
|
|
4406
|
-
```
|
|
4407
|
-
|
|
4408
|
-
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.
|
|
4409
|
-
|
|
4410
|
-
## How it works
|
|
4411
|
-
|
|
4412
|
-
`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".
|
|
4413
|
-
|
|
4414
|
-
- When `resolvedTheme` is `"dark"`, the `src.dark` image is displayed.
|
|
4415
|
-
- Otherwise, the `src.light` image is used.
|
|
4416
|
-
|
|
4417
|
-
Because this component relies on client-side theme detection, it is a client component (`"use client"`).
|
|
4418
|
-
|
|
4419
|
-
## Props
|
|
4420
|
-
|
|
4421
|
-
| Prop | Type | Description |
|
|
4422
|
-
| --- | --- | --- |
|
|
4423
|
-
| `src` | `{ light: ImageProps["src"]; dark: ImageProps["src"] }` | An object containing the light and dark image sources |
|
|
4424
|
-
| `alt` | `string` | Accessible alt text for the image |
|
|
4425
|
-
| `width` | `number` | The width of the image in pixels |
|
|
4426
|
-
| `height` | `number` | The height of the image in pixels |
|
|
4427
|
-
| `...rest` | `ImageProps` | Any additional props supported by the Next.js `Image` component |
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
4810
|
---
|
|
4431
4811
|
|
|
4432
4812
|
---
|