@vercel/geistdocs 1.2.3-canary.48fea3c → 1.2.3-canary.73598cf
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/icons/icon-arrow-up-right-small.d.ts +8 -0
- package/dist/assets/icons/icon-arrow-up-right-small.d.ts.map +1 -0
- package/dist/assets/icons/icon-arrow-up-right-small.js +4 -0
- package/dist/assets/icons/icon-arrow-up-right.d.ts +5 -0
- package/dist/assets/icons/icon-arrow-up-right.d.ts.map +1 -0
- package/dist/assets/icons/icon-arrow-up-right.js +4 -0
- package/dist/assets/icons/icon-check.d.ts +5 -0
- package/dist/assets/icons/icon-check.d.ts.map +1 -0
- package/dist/assets/icons/icon-check.js +4 -0
- package/dist/assets/icons/icon-chevron-down-small.d.ts +8 -0
- package/dist/assets/icons/icon-chevron-down-small.d.ts.map +1 -0
- package/dist/assets/icons/icon-chevron-down-small.js +7 -0
- package/dist/assets/icons/icon-chevron-right.d.ts +5 -0
- package/dist/assets/icons/icon-chevron-right.d.ts.map +1 -0
- package/dist/assets/icons/icon-chevron-right.js +4 -0
- package/dist/assets/icons/icon-copy.d.ts +5 -0
- package/dist/assets/icons/icon-copy.d.ts.map +1 -0
- package/dist/assets/icons/icon-copy.js +4 -0
- package/dist/assets/icons/icon-file-text.d.ts +5 -0
- package/dist/assets/icons/icon-file-text.d.ts.map +1 -0
- package/dist/assets/icons/icon-file-text.js +4 -0
- package/dist/assets/icons/icon-menu-alt.d.ts +5 -0
- package/dist/assets/icons/icon-menu-alt.d.ts.map +1 -0
- package/dist/assets/icons/icon-menu-alt.js +4 -0
- package/dist/assets/icons/icon-slash-forward.d.ts +8 -0
- package/dist/assets/icons/icon-slash-forward.d.ts.map +1 -0
- package/dist/assets/icons/icon-slash-forward.js +4 -0
- package/dist/assets/icons/index.d.ts +10 -0
- package/dist/assets/icons/index.d.ts.map +1 -0
- package/{template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx → dist/assets/icons/index.js} +0 -1
- package/dist/assets/logos/index.d.ts +15 -0
- package/dist/assets/logos/index.d.ts.map +1 -0
- package/{template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx → dist/assets/logos/index.js} +2 -1
- package/dist/assets/logos/logo-ai-elements.d.ts +8 -0
- package/dist/assets/logos/logo-ai-elements.d.ts.map +1 -0
- package/dist/assets/logos/logo-ai-elements.js +8 -0
- package/dist/assets/logos/logo-ai-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-ai-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-ai-sdk.js +8 -0
- package/dist/assets/logos/logo-chat-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-chat-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-chat-sdk.js +8 -0
- package/dist/assets/logos/logo-flags-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-flags-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-flags-sdk.js +8 -0
- package/dist/assets/logos/logo-icon-vercel.d.ts +9 -0
- package/dist/assets/logos/logo-icon-vercel.d.ts.map +1 -0
- package/dist/assets/logos/logo-icon-vercel.js +8 -0
- package/dist/assets/logos/logo-nextjs.d.ts +8 -0
- package/dist/assets/logos/logo-nextjs.d.ts.map +1 -0
- package/dist/assets/logos/logo-nextjs.js +7 -0
- package/dist/assets/logos/logo-streamdown.d.ts +8 -0
- package/dist/assets/logos/logo-streamdown.d.ts.map +1 -0
- package/dist/assets/logos/logo-streamdown.js +8 -0
- package/dist/assets/logos/logo-svelte-kit.d.ts +8 -0
- package/dist/assets/logos/logo-svelte-kit.d.ts.map +1 -0
- package/dist/assets/logos/logo-svelte-kit.js +7 -0
- package/dist/assets/logos/logo-vercel-oss.d.ts +8 -0
- package/dist/assets/logos/logo-vercel-oss.d.ts.map +1 -0
- package/dist/assets/logos/logo-vercel-oss.js +7 -0
- package/dist/assets/logos/logo-workflow-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-workflow-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-workflow-sdk.js +8 -0
- package/dist/cli/index.js +1 -1
- package/dist/components/button-group.d.ts +2 -0
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +2 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +2 -0
- package/dist/components/card.d.ts +2 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +2 -0
- package/dist/components/code-block-tabs.js +3 -3
- package/dist/components/code-block.js +3 -3
- package/dist/components/collapsible.d.ts +2 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +3 -0
- package/dist/components/copy-prompt.js +3 -3
- package/dist/components/dialog.d.ts +13 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +35 -0
- package/dist/components/drawer.d.ts +2 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +3 -0
- package/dist/components/dropdown-menu.d.ts +2 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +3 -0
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +3 -0
- package/dist/components/input.d.ts +2 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +2 -0
- package/dist/components/kbd.d.ts +2 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +2 -0
- package/dist/components/navigation-menu.d.ts +2 -0
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +3 -0
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +3 -0
- package/dist/components/scroll-area.d.ts +2 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +3 -0
- package/dist/components/separator.d.ts +2 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +3 -0
- package/dist/components/sheet.d.ts +2 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +3 -0
- package/dist/components/sonner.d.ts +2 -0
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +3 -0
- package/dist/components/spinner.d.ts +2 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +2 -0
- package/dist/components/textarea.d.ts +2 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +2 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +3 -0
- package/dist/config.d.ts +47 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/controls.js +4 -4
- package/dist/footer.d.ts +8 -0
- package/dist/footer.d.ts.map +1 -0
- package/dist/footer.js +6 -0
- package/dist/home-layout.d.ts +11 -0
- package/dist/home-layout.d.ts.map +1 -0
- package/dist/home-layout.js +31 -0
- package/dist/internal/chat/conversation.js +1 -1
- package/dist/internal/chat/message.js +1 -1
- package/dist/internal/chat/prompt-input.js +1 -1
- package/dist/internal/chat/shell.d.ts.map +1 -1
- package/dist/internal/chat/shell.js +6 -5
- package/dist/internal/chat/sources.js +1 -1
- package/dist/internal/config-context.d.ts +10 -0
- package/dist/internal/config-context.d.ts.map +1 -0
- package/dist/internal/config-context.js +15 -0
- package/dist/internal/footer/github-button.d.ts +7 -0
- package/dist/internal/footer/github-button.d.ts.map +1 -0
- package/dist/internal/footer/github-button.js +10 -0
- package/dist/internal/footer/rss-button.d.ts +2 -0
- package/dist/internal/footer/rss-button.d.ts.map +1 -0
- package/dist/internal/footer/rss-button.js +4 -0
- package/dist/internal/localized-link.d.ts +8 -0
- package/dist/internal/localized-link.d.ts.map +1 -0
- package/dist/internal/localized-link.js +13 -0
- package/dist/internal/navbar/desktop-menu.d.ts +10 -0
- package/dist/internal/navbar/desktop-menu.d.ts.map +1 -0
- package/dist/internal/navbar/desktop-menu.js +11 -0
- package/dist/internal/navbar/mobile-menu.d.ts +7 -0
- package/dist/internal/navbar/mobile-menu.d.ts.map +1 -0
- package/dist/internal/navbar/mobile-menu.js +44 -0
- package/dist/internal/navbar/navbar-logo.d.ts +16 -0
- package/dist/internal/navbar/navbar-logo.d.ts.map +1 -0
- package/dist/internal/navbar/navbar-logo.js +30 -0
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +17 -6
- package/dist/internal/page-visibility.d.ts +18 -0
- package/dist/internal/page-visibility.d.ts.map +1 -0
- package/dist/internal/page-visibility.js +24 -0
- package/dist/internal/provider-client.d.ts +1 -1
- package/dist/internal/provider-client.d.ts.map +1 -1
- package/dist/internal/provider-client.js +2 -1
- package/dist/internal/sidebar.js +3 -3
- package/dist/internal/ui/button-group.js +2 -2
- package/dist/internal/ui/button.d.ts +1 -1
- package/dist/internal/ui/button.d.ts.map +1 -1
- package/dist/internal/ui/button.js +7 -7
- package/dist/internal/ui/card.js +1 -1
- package/dist/internal/ui/drawer.js +1 -1
- package/dist/internal/ui/dropdown-menu.js +7 -7
- package/dist/internal/ui/input-group.js +2 -2
- package/dist/internal/ui/input.js +1 -1
- package/dist/internal/ui/kbd.js +1 -1
- package/dist/internal/ui/navigation-menu.d.ts +17 -0
- package/dist/internal/ui/navigation-menu.d.ts.map +1 -0
- package/dist/internal/ui/navigation-menu.js +38 -0
- package/dist/internal/ui/popover.js +1 -1
- package/dist/internal/ui/scroll-area.js +2 -2
- package/dist/internal/ui/separator.js +1 -1
- package/dist/internal/ui/sheet.js +4 -4
- package/dist/internal/ui/sonner.js +3 -3
- package/dist/internal/ui/textarea.js +1 -1
- package/dist/internal/ui/tooltip.js +1 -1
- package/dist/mdx.d.ts +55 -24
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +7 -46
- package/dist/mobile-docs-bar.d.ts +7 -0
- package/dist/mobile-docs-bar.d.ts.map +1 -0
- package/dist/mobile-docs-bar.js +13 -0
- package/dist/navbar.d.ts +7 -0
- package/dist/navbar.d.ts.map +1 -0
- package/dist/navbar.js +10 -0
- package/dist/pages/docs.d.ts +8 -2
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +13 -7
- package/dist/proxy.d.ts +1 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +29 -2
- package/dist/routes/agents.d.ts +21 -0
- package/dist/routes/agents.d.ts.map +1 -0
- package/dist/routes/agents.js +201 -0
- package/dist/routes/chat.d.ts +7 -2
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +373 -65
- package/dist/routes/llms.d.ts +6 -5
- package/dist/routes/llms.d.ts.map +1 -1
- package/dist/routes/llms.js +63 -12
- package/dist/routes/search.d.ts +6 -4
- package/dist/routes/search.d.ts.map +1 -1
- package/dist/routes/search.js +8 -1
- package/dist/routes/sitemap.d.ts +6 -3
- package/dist/routes/sitemap.d.ts.map +1 -1
- package/dist/routes/sitemap.js +10 -2
- package/dist/shiki-theme.d.ts +20 -0
- package/dist/shiki-theme.d.ts.map +1 -0
- package/dist/shiki-theme.js +110 -0
- package/dist/source-config.d.ts +68 -0
- package/dist/source-config.d.ts.map +1 -0
- package/dist/source-config.js +161 -0
- package/dist/source.d.ts +8 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +14 -1
- package/dist/versions.d.ts +31 -1
- package/dist/versions.d.ts.map +1 -1
- package/dist/versions.js +56 -29
- package/package.json +126 -5
- package/source-config.js +174 -0
- package/styles.css +465 -102
- package/template/AGENTS.md +95 -0
- package/template/app/[lang]/(home)/components/centered-section.tsx +1 -3
- package/template/app/[lang]/(home)/components/hero.tsx +2 -2
- package/template/app/[lang]/(home)/components/one-two-section.tsx +1 -3
- package/template/app/[lang]/(home)/components/templates.tsx +3 -5
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +1 -1
- package/template/app/[lang]/(home)/layout.tsx +4 -3
- package/template/app/[lang]/(home)/page.tsx +2 -2
- package/template/app/[lang]/agents.md/route.ts +6 -0
- package/template/app/[lang]/docs/[[...slug]]/page.tsx +4 -1
- package/template/app/[lang]/layout.tsx +6 -6
- package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +1 -1
- package/template/app/[lang]/sitemap.md/route.ts +2 -2
- package/template/app/api/chat/route.ts +11 -0
- package/template/app/api/search/route.ts +2 -2
- package/template/app/styles/geistdocs.css +150 -109
- package/template/components/ui/badge.tsx +5 -5
- package/template/components/ui/button.tsx +7 -7
- package/template/components/ui/command-prompt.tsx +2 -2
- package/template/content/docs/agent-readiness.mdx +103 -0
- package/template/content/docs/ask-ai.mdx +55 -3
- package/template/content/docs/configuration.mdx +77 -2
- package/template/content/docs/deployment.mdx +11 -0
- package/template/content/docs/env.mdx +36 -5
- package/template/content/docs/getting-started.mdx +8 -1
- package/template/content/docs/index.mdx +5 -0
- package/template/content/docs/llms-txt.mdx +1 -0
- package/template/content/docs/md.mdx +2 -1
- package/template/content/docs/meta.json +2 -0
- package/template/content/docs/migration.mdx +364 -0
- package/template/content/docs/proxy.cn.mdx +1 -1
- package/template/content/docs/proxy.mdx +56 -2
- package/template/content/docs/theme-aware-image.mdx +1 -1
- package/template/content/docs/versioned-docs.mdx +49 -2
- package/template/geistdocs.tsx +26 -0
- package/template/lib/geistdocs/config.tsx +3 -0
- package/template/package.json +5 -5
- package/template/proxy.ts +1 -2
- package/template/source.config.ts +8 -47
- package/template/app/actions/feedback/emotions.ts +0 -18
- package/template/app/actions/feedback/index.ts +0 -45
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +0 -35
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +0 -30
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +0 -25
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +0 -36
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +0 -29
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +0 -38
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +0 -42
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +0 -42
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +0 -31
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +0 -29
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +0 -24
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +0 -73
- package/template/components/geistdocs/callout.tsx +0 -40
- package/template/components/geistdocs/chat.tsx +0 -24
- package/template/components/geistdocs/code-block-tabs.tsx +0 -61
- package/template/components/geistdocs/code-block.tsx +0 -134
- package/template/components/geistdocs/copy-page.tsx +0 -27
- package/template/components/geistdocs/desktop-menu.tsx +0 -52
- package/template/components/geistdocs/docs-page.tsx +0 -35
- package/template/components/geistdocs/edit-source.tsx +0 -30
- package/template/components/geistdocs/feedback.tsx +0 -139
- package/template/components/geistdocs/footer.tsx +0 -30
- package/template/components/geistdocs/github-button.tsx +0 -19
- package/template/components/geistdocs/home-layout.tsx +0 -46
- package/template/components/geistdocs/icons.tsx +0 -13
- package/template/components/geistdocs/installer.tsx +0 -58
- package/template/components/geistdocs/language-selector.tsx +0 -3
- package/template/components/geistdocs/mermaid.tsx +0 -68
- package/template/components/geistdocs/mobile-docs-bar.tsx +0 -77
- package/template/components/geistdocs/mobile-menu.tsx +0 -150
- package/template/components/geistdocs/navbar-logo.tsx +0 -124
- package/template/components/geistdocs/navbar.tsx +0 -22
- package/template/components/geistdocs/rss-button.tsx +0 -10
- package/template/components/geistdocs/scroll-top.tsx +0 -21
- package/template/components/geistdocs/search.tsx +0 -17
- package/template/components/geistdocs/sidebar.tsx +0 -128
- package/template/components/geistdocs/theme-aware-image.tsx +0 -22
- package/template/components/geistdocs/theme-toggle.tsx +0 -3
- package/template/components/geistdocs/video.tsx +0 -16
- package/template/components/ui/button-group.tsx +0 -83
- package/template/components/ui/card.tsx +0 -92
- package/template/components/ui/collapsible.tsx +0 -33
- package/template/components/ui/command.tsx +0 -184
- package/template/components/ui/dialog.tsx +0 -143
- package/template/components/ui/drawer.tsx +0 -135
- package/template/components/ui/dropdown-menu.tsx +0 -257
- package/template/components/ui/hover-card.tsx +0 -44
- package/template/components/ui/input-group.tsx +0 -170
- package/template/components/ui/input.tsx +0 -21
- package/template/components/ui/kbd.tsx +0 -28
- package/template/components/ui/navigation-menu.tsx +0 -192
- package/template/components/ui/popover.tsx +0 -48
- package/template/components/ui/scroll-area.tsx +0 -58
- package/template/components/ui/select.tsx +0 -187
- package/template/components/ui/separator.tsx +0 -28
- package/template/components/ui/sheet.tsx +0 -139
- package/template/components/ui/sonner.tsx +0 -40
- package/template/components/ui/spinner.tsx +0 -16
- package/template/components/ui/textarea.tsx +0 -18
- package/template/components/ui/tooltip.tsx +0 -61
- package/template/hooks/geistdocs/use-sidebar.ts +0 -13
- package/template/hooks/use-mobile.ts +0 -19
|
@@ -5,18 +5,18 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
5
5
|
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
7
|
const badgeVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-
|
|
8
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-gray-600 focus-visible:ring-gray-600/50 focus-visible:ring-[3px] aria-invalid:ring-red-800/20 dark:aria-invalid:ring-red-800/40 aria-invalid:border-red-800 transition-[color,box-shadow] overflow-hidden",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
default:
|
|
13
|
-
"border-transparent bg-
|
|
13
|
+
"border-transparent bg-gray-1000 text-background-100 [a&]:hover:bg-gray-1000/90",
|
|
14
14
|
secondary:
|
|
15
|
-
"border-transparent bg-gray-
|
|
15
|
+
"border-transparent bg-gray-alpha-400 text-gray-1000 [a&]:hover:bg-gray-alpha-400/90",
|
|
16
16
|
destructive:
|
|
17
|
-
"border-transparent bg-
|
|
17
|
+
"border-transparent bg-red-800 text-white [a&]:hover:bg-red-800/90 focus-visible:ring-red-800/20 dark:focus-visible:ring-red-800/40 dark:bg-red-800/60",
|
|
18
18
|
outline:
|
|
19
|
-
"text-
|
|
19
|
+
"text-gray-1000 [a&]:hover:bg-gray-100 [a&]:hover:text-gray-1000",
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
defaultVariants: {
|
|
@@ -5,20 +5,20 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
5
5
|
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-
|
|
8
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-gray-600 focus-visible:ring-gray-600/50 focus-visible:ring-[3px] aria-invalid:ring-red-800/20 dark:aria-invalid:ring-red-800/40 aria-invalid:border-red-800",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default: "bg-
|
|
12
|
+
default: "bg-gray-1000 text-background-100 hover:bg-gray-1000/90",
|
|
13
13
|
destructive:
|
|
14
|
-
"bg-
|
|
14
|
+
"bg-red-800 text-white hover:bg-red-800/90 focus-visible:ring-red-800/20 dark:focus-visible:ring-red-800/40 dark:bg-red-800/60",
|
|
15
15
|
outline:
|
|
16
|
-
"border bg-background shadow-xs hover:bg-
|
|
16
|
+
"border bg-background-100 shadow-xs hover:bg-gray-100 hover:text-gray-1000 dark:bg-gray-alpha-400/30 dark:border-gray-alpha-400 dark:hover:bg-gray-alpha-400/50",
|
|
17
17
|
secondary:
|
|
18
|
-
"bg-
|
|
18
|
+
"bg-gray-100 text-gray-1000 hover:bg-gray-100/80",
|
|
19
19
|
ghost:
|
|
20
|
-
"hover:bg-
|
|
21
|
-
link: "text-
|
|
20
|
+
"hover:bg-gray-100 hover:text-gray-1000 dark:hover:bg-gray-100/50",
|
|
21
|
+
link: "text-gray-1000 underline-offset-4 hover:underline",
|
|
22
22
|
},
|
|
23
23
|
size: {
|
|
24
24
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
useRef,
|
|
15
15
|
useState,
|
|
16
16
|
} from "react";
|
|
17
|
-
import { IconCheck } from "
|
|
18
|
-
import { IconCopy } from "
|
|
17
|
+
import { IconCheck } from "@vercel/geistdocs/assets/icons/icon-check";
|
|
18
|
+
import { IconCopy } from "@vercel/geistdocs/assets/icons/icon-copy";
|
|
19
19
|
import { cn } from "@/lib/utils";
|
|
20
20
|
|
|
21
21
|
type CommandPromptContextValue = {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Agent readiness
|
|
3
|
+
description: Expose a concise agents.md file that helps AI agents discover and use your docs site
|
|
4
|
+
type: guide
|
|
5
|
+
summary: Generate /agents.md from Geistdocs config so agents can find docs, Markdown surfaces, API specs, and MCP endpoints.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/llms-txt
|
|
8
|
+
- /docs/md
|
|
9
|
+
- /docs/proxy
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Geistdocs can generate `/agents.md`, a concise Markdown file that tells AI agents what your product is, where your docs live, and which machine-readable integration surfaces are available.
|
|
13
|
+
|
|
14
|
+
<CopyPrompt text="Review this Geistdocs site's /agents.md file. Check whether it lists the product description, documentation links, llms.txt, sitemap.md, OpenAPI specs, and MCP servers accurately.">
|
|
15
|
+
Review this Geistdocs site's `/agents.md` file. Check whether it lists the product description, documentation links, `llms.txt`, `sitemap.md`, OpenAPI specs, and MCP servers accurately.
|
|
16
|
+
</CopyPrompt>
|
|
17
|
+
|
|
18
|
+
## What it provides
|
|
19
|
+
|
|
20
|
+
The generated `/agents.md` file gives agents a stable starting point before they crawl the rest of your documentation.
|
|
21
|
+
|
|
22
|
+
It can include:
|
|
23
|
+
|
|
24
|
+
- Product name, description, category, audience, and use cases
|
|
25
|
+
- Human-readable docs entry points
|
|
26
|
+
- `/llms.txt` for full documentation context
|
|
27
|
+
- `/sitemap.md` for semantic navigation
|
|
28
|
+
- Page-level Markdown guidance for `.md` and `.mdx` URLs
|
|
29
|
+
- OpenAPI, authentication, scopes, rate limit, and error docs when configured
|
|
30
|
+
- MCP manifests and server URLs when configured
|
|
31
|
+
- Additional links and agent instructions
|
|
32
|
+
|
|
33
|
+
## Add the route
|
|
34
|
+
|
|
35
|
+
Generated projects include a thin App Router adapter:
|
|
36
|
+
|
|
37
|
+
```ts title="app/[lang]/agents.md/route.ts"
|
|
38
|
+
import { createAgentsRoute } from "@vercel/geistdocs/routes/agents";
|
|
39
|
+
import { config } from "@/lib/geistdocs/config";
|
|
40
|
+
|
|
41
|
+
export const { GET, generateStaticParams, revalidate } = createAgentsRoute({
|
|
42
|
+
config,
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Because the route is under `[lang]`, the Geistdocs proxy can serve `/agents.md` through the default language route.
|
|
47
|
+
|
|
48
|
+
## Configure agent metadata
|
|
49
|
+
|
|
50
|
+
Add agent-readiness metadata in `geistdocs.tsx`, then pass it through `defineConfig` in `lib/geistdocs/config.tsx`.
|
|
51
|
+
|
|
52
|
+
```tsx title="geistdocs.tsx"
|
|
53
|
+
import type { GeistdocsAgentReadinessConfig } from "@vercel/geistdocs/config";
|
|
54
|
+
|
|
55
|
+
export const agent = {
|
|
56
|
+
product: {
|
|
57
|
+
name: "My Product",
|
|
58
|
+
description: "My Product helps teams build and deploy applications.",
|
|
59
|
+
category: "Developer tools",
|
|
60
|
+
audience: ["Frontend developers", "Platform teams"],
|
|
61
|
+
useCases: ["Deploy applications", "Manage domains", "Inspect logs"],
|
|
62
|
+
},
|
|
63
|
+
api: {
|
|
64
|
+
openApiUrl: "https://api.example.com/openapi.json",
|
|
65
|
+
authDocsUrl: "/docs/authentication",
|
|
66
|
+
scopesDocsUrl: "/docs/scopes",
|
|
67
|
+
rateLimitsUrl: "/docs/rate-limits",
|
|
68
|
+
errorsUrl: "/docs/errors",
|
|
69
|
+
},
|
|
70
|
+
mcp: {
|
|
71
|
+
manifestUrl: "/.well-known/mcp.json",
|
|
72
|
+
servers: [
|
|
73
|
+
{
|
|
74
|
+
name: "My Product MCP",
|
|
75
|
+
url: "https://example.com/api/mcp",
|
|
76
|
+
description: "Use product tools through MCP.",
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
links: [
|
|
81
|
+
{
|
|
82
|
+
label: "Support",
|
|
83
|
+
href: "https://example.com/support",
|
|
84
|
+
description: "Get help from the product team.",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
} satisfies GeistdocsAgentReadinessConfig;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```tsx title="lib/geistdocs/config.tsx"
|
|
91
|
+
import { agent } from "@/geistdocs";
|
|
92
|
+
|
|
93
|
+
export const config = defineConfig({
|
|
94
|
+
// ...
|
|
95
|
+
agent,
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Keep it honest
|
|
100
|
+
|
|
101
|
+
Only list OpenAPI specs, authentication flows, or MCP servers that actually exist. Geistdocs makes product capabilities discoverable, but it does not create APIs or MCP tools for you.
|
|
102
|
+
|
|
103
|
+
Use `/agents.md` with [llms.txt](/docs/llms-txt), [.md extension](/docs/md), and [Proxy and markdown routes](/docs/proxy) to give agents a complete discovery path.
|
|
@@ -43,17 +43,69 @@ Once open, users can:
|
|
|
43
43
|
- View AI-powered search results from your docs
|
|
44
44
|
- Get step-by-step guidance on complex topics
|
|
45
45
|
|
|
46
|
+
## AI SDK dependency ownership
|
|
47
|
+
|
|
48
|
+
Geistdocs Ask AI is built on AI SDK v6. Generated projects install `ai` v6 and `@ai-sdk/react` v3, and `@vercel/geistdocs` owns the chat client, transport, and `createChatRoute` server behavior.
|
|
49
|
+
|
|
50
|
+
When a consumer app already uses the AI SDK outside Geistdocs, treat that as app code. Upgrade the app code to the installed AI SDK version or let the package manager install separate versions if needed. Do not fork Geistdocs chat internals or downgrade Ask AI to match unrelated app usage.
|
|
51
|
+
|
|
52
|
+
Most projects should not customize the chat transport. If you do customize `DefaultChatTransport.prepareSendMessagesRequest`, preserve `messages` in the returned request body. The AI SDK passes `messages` separately from `body`, and returning a custom `body` replaces the default request body.
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
prepareSendMessagesRequest: ({ body, messages }) => ({
|
|
56
|
+
body: {
|
|
57
|
+
...body,
|
|
58
|
+
messages,
|
|
59
|
+
currentRoute: pathname,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Choose an AI mode
|
|
65
|
+
|
|
66
|
+
Ask AI can run in the default AI Gateway mode or through a Vertex-backed proxy.
|
|
67
|
+
|
|
68
|
+
### Default AI Gateway mode
|
|
69
|
+
|
|
70
|
+
Use the default mode when the Geistdocs site should call the Vercel AI Gateway directly.
|
|
71
|
+
|
|
72
|
+
1. Leave `GEISTDOCS_CHAT_PROXY_URL` unset.
|
|
73
|
+
2. Set `AI_GATEWAY_API_KEY` for local development. Vercel sets this automatically for deployments that have AI Gateway access.
|
|
74
|
+
3. Keep `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` set to the site's production host, such as `docs.example.com` or `localhost:3000` for local development.
|
|
75
|
+
|
|
76
|
+
In this mode, Geistdocs uses the local `search_docs` tool during the AI SDK `streamText` loop.
|
|
77
|
+
|
|
78
|
+
### Vertex-backed proxy mode
|
|
79
|
+
|
|
80
|
+
Use proxy mode when Ask AI should route model requests through a central Vertex-backed service instead of calling AI Gateway from each site.
|
|
81
|
+
|
|
82
|
+
1. Deploy or use the central Geistdocs platform proxy that exposes `POST /vertex`.
|
|
83
|
+
2. Configure the Vertex deployment to trust the Geistdocs platform Vercel project with Deployment Protection Trusted Sources.
|
|
84
|
+
3. Set `GEISTDOCS_CHAT_PROXY_URL` on the Geistdocs site to the platform proxy URL, including `/vertex`:
|
|
85
|
+
|
|
86
|
+
```txt
|
|
87
|
+
https://<geistdocs-platform-deployment>/vertex
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
4. Leave `GEISTDOCS_CHAT_PROXY_TOKEN` unset unless you are using a custom proxy that requires bearer authentication.
|
|
91
|
+
|
|
92
|
+
When `GEISTDOCS_CHAT_PROXY_URL` is set, Geistdocs searches local docs on the first user message, injects the current page and related docs into the final user message, forwards `{ messages, platform: "vercel" }` to the proxy, and streams the AI SDK UI stream response back to the browser.
|
|
93
|
+
|
|
94
|
+
The platform proxy forwards a Vercel OIDC token to Vertex in the `x-vercel-trusted-oidc-idp-token` header. The Vertex deployment should validate the caller through Trusted Sources; the Geistdocs site does not need a Vertex API key.
|
|
95
|
+
|
|
46
96
|
## Features
|
|
47
97
|
|
|
48
98
|
### Context-Aware Search
|
|
49
99
|
|
|
50
|
-
|
|
100
|
+
By default, the AI assistant includes a built-in `search_docs` tool that:
|
|
51
101
|
|
|
52
102
|
1. Searches through your documentation content
|
|
53
103
|
2. Finds relevant pages based on the user's question
|
|
54
104
|
3. Shows source citations with links to the referenced pages
|
|
55
105
|
4. Uses the content to provide accurate, contextual answers
|
|
56
106
|
|
|
107
|
+
When `GEISTDOCS_CHAT_PROXY_URL` is set, Geistdocs runs local documentation retrieval on the first user message before forwarding the request to the configured proxy. This gives proxy-backed services access to the current page and related local documentation without requiring them to read the site's source files directly.
|
|
108
|
+
|
|
57
109
|
### Persistent Chat History
|
|
58
110
|
|
|
59
111
|
Conversations are automatically saved to the browser's IndexedDB, providing:
|
|
@@ -80,9 +132,9 @@ The chat interface adapts to different screen sizes:
|
|
|
80
132
|
|
|
81
133
|
## Configuration
|
|
82
134
|
|
|
83
|
-
The environment variables `AI_GATEWAY_API_KEY` and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` must be set
|
|
135
|
+
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.
|
|
84
136
|
|
|
85
|
-
|
|
137
|
+
In default AI Gateway mode, Geistdocs uses `openai/gpt-4.1-mini` via the Vercel AI Gateway. In Vertex-backed proxy mode, the configured proxy controls the upstream model.
|
|
86
138
|
|
|
87
139
|
## Suggested Prompts
|
|
88
140
|
|
|
@@ -6,6 +6,7 @@ summary: Configure site metadata, navigation, AI features, page actions, transla
|
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/getting-started
|
|
8
8
|
related:
|
|
9
|
+
- /docs/migration
|
|
9
10
|
- /docs/provider
|
|
10
11
|
- /docs/env
|
|
11
12
|
- /docs/versioned-docs
|
|
@@ -22,12 +23,15 @@ Configure Geistdocs through user-owned files in the generated project. Runtime f
|
|
|
22
23
|
|
|
23
24
|
| File | Purpose |
|
|
24
25
|
| --- | --- |
|
|
25
|
-
| `geistdocs.tsx` | Site-level settings, including logo, nav, GitHub repo, AI prompt, translations, and feature flags. |
|
|
26
|
+
| `geistdocs.tsx` | Site-level settings, including logo, nav, GitHub repo, AI prompt, agent-readiness metadata, translations, and feature flags. |
|
|
27
|
+
| `source.config.ts` | Configures Fumadocs collections with the package-provided schema, Markdown plugins, and syntax theme. |
|
|
26
28
|
| `lib/geistdocs/config.tsx` | Converts `geistdocs.tsx` exports into the package config using `defineConfig`. |
|
|
29
|
+
| `source.config.ts` | Configures Fumadocs collections with package-safe schemas and Markdown processing. |
|
|
27
30
|
| `lib/geistdocs/source.ts` | Connects Fumadocs content collections to the package source adapter. |
|
|
28
31
|
| `components/geistdocs/mdx-components.tsx` | Adds or overrides MDX components. |
|
|
29
32
|
| `components/geistdocs/docs-layout.tsx` | Customizes the package-backed docs layout, including optional sidebar content. |
|
|
30
33
|
| `app/[lang]/docs/[[...slug]]/page.tsx` | Configures the package docs page renderer. |
|
|
34
|
+
| `app/[lang]/agents.md/route.ts` | Configures the agent-readiness entry point. |
|
|
31
35
|
| `app/[lang]/llms.txt/route.ts` | Configures the all-docs Markdown endpoint. |
|
|
32
36
|
| `app/[lang]/llms.mdx/[[...slug]]/route.ts` | Configures single-page Markdown responses. |
|
|
33
37
|
| `proxy.ts` | Configures markdown negotiation, AI-agent rewrites, request tracking, and custom request hooks. |
|
|
@@ -43,6 +47,8 @@ export const Logo = () => <span>My Docs</span>;
|
|
|
43
47
|
export const github = {
|
|
44
48
|
owner: "my-org",
|
|
45
49
|
repo: "my-repo",
|
|
50
|
+
branch: "main",
|
|
51
|
+
editPath: "content/docs/{path}",
|
|
46
52
|
};
|
|
47
53
|
|
|
48
54
|
export const nav = [
|
|
@@ -60,6 +66,13 @@ export const suggestions = [
|
|
|
60
66
|
"How do I deploy?",
|
|
61
67
|
];
|
|
62
68
|
|
|
69
|
+
export const agent = {
|
|
70
|
+
product: {
|
|
71
|
+
name: "My Product",
|
|
72
|
+
description: "My Product helps teams build and deploy applications.",
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
63
76
|
export const translations = {
|
|
64
77
|
en: { displayName: "English" },
|
|
65
78
|
};
|
|
@@ -75,6 +88,7 @@ export const siteId: string | undefined = undefined;
|
|
|
75
88
|
```tsx title="lib/geistdocs/config.tsx"
|
|
76
89
|
import { defineConfig } from "@vercel/geistdocs/config";
|
|
77
90
|
import {
|
|
91
|
+
agent,
|
|
78
92
|
basePath,
|
|
79
93
|
github,
|
|
80
94
|
Logo,
|
|
@@ -88,6 +102,7 @@ import {
|
|
|
88
102
|
|
|
89
103
|
export const config = defineConfig({
|
|
90
104
|
title,
|
|
105
|
+
agent,
|
|
91
106
|
defaultLanguage: "en",
|
|
92
107
|
logo: <Logo />,
|
|
93
108
|
github,
|
|
@@ -128,6 +143,36 @@ export const config = defineConfig({
|
|
|
128
143
|
|
|
129
144
|
Use [Versioned docs](/docs/versioned-docs) for versioned source setup and [Proxy and markdown routes](/docs/proxy) for route mappings.
|
|
130
145
|
|
|
146
|
+
## `source.config.ts`
|
|
147
|
+
|
|
148
|
+
Use the source-config-safe package export in `source.config.ts`. This file is evaluated by `fumadocs-mdx` during install and build, so it should avoid imports from runtime component entry points such as `@vercel/geistdocs/mdx`.
|
|
149
|
+
|
|
150
|
+
```ts title="source.config.ts"
|
|
151
|
+
import {
|
|
152
|
+
defineGeistdocsSourceConfig,
|
|
153
|
+
geistdocsFrontmatterSchema,
|
|
154
|
+
geistdocsMetaSchema,
|
|
155
|
+
} from "@vercel/geistdocs/source-config";
|
|
156
|
+
import { defineDocs } from "fumadocs-mdx/config";
|
|
157
|
+
|
|
158
|
+
export const docs = defineDocs({
|
|
159
|
+
dir: "content/docs",
|
|
160
|
+
docs: {
|
|
161
|
+
schema: geistdocsFrontmatterSchema,
|
|
162
|
+
postprocess: {
|
|
163
|
+
includeProcessedMarkdown: true,
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
meta: {
|
|
167
|
+
schema: geistdocsMetaSchema,
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
export default defineGeistdocsSourceConfig();
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
To serve docs from the site root, use `route: "/"` in `content` and `baseUrl: "/"` in `createSource`. Root-mounted docs need explicit `markdownRoutes`; Geistdocs does not infer a broad `/*path` mapping because it can capture homepages and non-docs app routes.
|
|
175
|
+
|
|
131
176
|
## Page actions
|
|
132
177
|
|
|
133
178
|
Page actions appear below the table of contents. They are enabled by default and can be disabled through `defineConfig` in `lib/geistdocs/config.tsx`:
|
|
@@ -148,6 +193,33 @@ export const config = defineConfig({
|
|
|
148
193
|
});
|
|
149
194
|
```
|
|
150
195
|
|
|
196
|
+
`github.editPath` controls the file path used by the "Edit this page on GitHub" action. Use `{path}` where the page path should be inserted. For monorepos, include the app directory, such as `apps/docs/content/docs/{path}`.
|
|
197
|
+
|
|
198
|
+
## Page visibility
|
|
199
|
+
|
|
200
|
+
Use frontmatter to control whether a page appears in package-owned machine-readable surfaces:
|
|
201
|
+
|
|
202
|
+
```mdx title="content/docs/internal-note.mdx"
|
|
203
|
+
---
|
|
204
|
+
title: Internal note
|
|
205
|
+
description: Hidden from public indexes
|
|
206
|
+
internal: true
|
|
207
|
+
---
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
`internal: true` excludes a page from `llms.txt`, `sitemap.md`, search, and chat. `noindex: true` adds `robots: noindex` metadata and excludes the page from `sitemap.md`. Use `excludeFrom` for per-surface control:
|
|
211
|
+
|
|
212
|
+
```mdx
|
|
213
|
+
---
|
|
214
|
+
title: Draft guide
|
|
215
|
+
excludeFrom:
|
|
216
|
+
- chat
|
|
217
|
+
- search
|
|
218
|
+
---
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Optional `tags`, `keywords`, and `canonical` frontmatter are also recognized by the package runtime.
|
|
222
|
+
|
|
151
223
|
## User-owned adapters
|
|
152
224
|
|
|
153
225
|
Adapter files are safe to edit. Package updates do not overwrite them.
|
|
@@ -182,12 +254,15 @@ const docsPage = createDocsPage({
|
|
|
182
254
|
config,
|
|
183
255
|
source: geistdocsSource,
|
|
184
256
|
getPageUrl: ({ page }) => page.url,
|
|
257
|
+
openGraph: {
|
|
258
|
+
images: true,
|
|
259
|
+
},
|
|
185
260
|
metadata: ({ metadata }) => metadata,
|
|
186
261
|
mdx: ({ link }) => getMDXComponents({ a: link }),
|
|
187
262
|
});
|
|
188
263
|
```
|
|
189
264
|
|
|
190
|
-
Use `getPageUrl` when the public route differs from the source URL, such as `/v5/docs`. Use `metadata` to set canonical URLs, `robots`, or Open Graph fields for a specific route.
|
|
265
|
+
Use `getPageUrl` when the public route differs from the source URL, such as `/v5/docs`. Set `openGraph.images` to `true` only when your site includes the Geistdocs OG route. Use `metadata` to set canonical URLs, `robots`, or custom Open Graph fields for a specific route.
|
|
191
266
|
|
|
192
267
|
## Package-owned runtime
|
|
193
268
|
|
|
@@ -38,3 +38,14 @@ To deploy from the Vercel dashboard:
|
|
|
38
38
|
- **Install Command**: `pnpm install` or `npm install`
|
|
39
39
|
4. Add your environment variables (see [Environment Variables](/docs/env))
|
|
40
40
|
5. Click "Deploy"
|
|
41
|
+
|
|
42
|
+
## Deploy with Vertex-backed Ask AI
|
|
43
|
+
|
|
44
|
+
If your site routes Ask AI through the central Vertex-backed proxy, configure both the Geistdocs site and the Vertex deployment before testing production chat.
|
|
45
|
+
|
|
46
|
+
1. Set `GEISTDOCS_CHAT_PROXY_URL` on the Geistdocs site to the platform proxy URL, including `/vertex`.
|
|
47
|
+
2. Leave `GEISTDOCS_CHAT_PROXY_TOKEN` unset unless your proxy requires bearer authentication.
|
|
48
|
+
3. Add the Geistdocs platform Vercel project as a Trusted Source in the Vertex deployment's Deployment Protection settings.
|
|
49
|
+
4. Confirm the platform proxy can forward the Vercel OIDC token to Vertex in `x-vercel-trusted-oidc-idp-token`.
|
|
50
|
+
|
|
51
|
+
The Geistdocs site does not need Vertex credentials. The platform proxy authenticates to Vertex with Vercel OIDC and Trusted Sources.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: Environment Variables
|
|
3
3
|
description: Learn about the environment variables used in Geistdocs
|
|
4
4
|
type: reference
|
|
5
|
-
summary: Environment variables required by Geistdocs for AI chat and production URL configuration.
|
|
5
|
+
summary: Environment variables required by Geistdocs for AI chat, proxy mode, and production URL configuration.
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/getting-started
|
|
8
8
|
related:
|
|
@@ -10,18 +10,49 @@ related:
|
|
|
10
10
|
- /docs/deployment
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
Geistdocs
|
|
13
|
+
Geistdocs uses environment variables to configure Ask AI, optional Vertex-backed proxy mode, and production URL behavior.
|
|
14
14
|
|
|
15
|
-
<CopyPrompt text="Review this Geistdocs project and help me configure the required environment variables. Check whether AI_GATEWAY_API_KEY and NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL are needed for the features I enabled, then tell me where to set them locally and on Vercel.">
|
|
16
|
-
Review this Geistdocs project and help me configure the required environment variables. Check whether `AI_GATEWAY_API_KEY` and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` are needed for the features I enabled, then tell me where to set them locally and on Vercel.
|
|
15
|
+
<CopyPrompt text="Review this Geistdocs project and help me configure the required environment variables. Check whether AI_GATEWAY_API_KEY, GEISTDOCS_CHAT_PROXY_URL, and NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL are needed for the features I enabled, then tell me where to set them locally and on Vercel.">
|
|
16
|
+
Review this Geistdocs project and help me configure the required environment variables. Check whether `AI_GATEWAY_API_KEY`, `GEISTDOCS_CHAT_PROXY_URL`, and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` are needed for the features I enabled, then tell me where to set them locally and on Vercel.
|
|
17
17
|
</CopyPrompt>
|
|
18
18
|
|
|
19
19
|
## `AI_GATEWAY_API_KEY`
|
|
20
20
|
|
|
21
|
-
The API key for the AI
|
|
21
|
+
The API key for the AI Gateway. This is used to power the default local AI chat functionality when `GEISTDOCS_CHAT_PROXY_URL` is not set.
|
|
22
22
|
|
|
23
23
|
<Callout>This is automatically set when deploying to Vercel.</Callout>
|
|
24
24
|
|
|
25
|
+
Leave `GEISTDOCS_CHAT_PROXY_URL` unset to use AI Gateway mode.
|
|
26
|
+
|
|
27
|
+
## `GEISTDOCS_CHAT_PROXY_URL`
|
|
28
|
+
|
|
29
|
+
An optional URL for a chat proxy. When set, Geistdocs searches the local documentation on the first user message, injects the current page and related docs as context, and forwards the request to this proxy.
|
|
30
|
+
|
|
31
|
+
Use this when routing Ask AI through a central Vertex-backed service. The value should point at the Geistdocs platform proxy and include `/vertex`:
|
|
32
|
+
|
|
33
|
+
```txt
|
|
34
|
+
https://<geistdocs-platform-deployment>/vertex
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
When this variable is set, the site does not need `AI_GATEWAY_API_KEY` for Ask AI requests. The platform proxy calls Vertex and forwards a Vercel OIDC token in `x-vercel-trusted-oidc-idp-token` so the Vertex deployment can validate the caller through Deployment Protection Trusted Sources.
|
|
38
|
+
|
|
39
|
+
## `GEISTDOCS_CHAT_PROXY_TOKEN`
|
|
40
|
+
|
|
41
|
+
An optional bearer token for the chat proxy. Only set this if your proxy requires an `Authorization` header.
|
|
42
|
+
|
|
43
|
+
The default Geistdocs platform `/vertex` proxy uses Vercel OIDC and Trusted Sources, so it does not require this token.
|
|
44
|
+
|
|
45
|
+
## Vertex-backed proxy setup
|
|
46
|
+
|
|
47
|
+
To route Ask AI through Vertex:
|
|
48
|
+
|
|
49
|
+
1. Use or deploy the central Geistdocs platform proxy with its `/vertex` route.
|
|
50
|
+
2. In the Vertex deployment's Deployment Protection settings, add the Geistdocs platform Vercel project as a Trusted Source.
|
|
51
|
+
3. In each Geistdocs site that should use Vertex, set `GEISTDOCS_CHAT_PROXY_URL` to the platform proxy URL, including `/vertex`.
|
|
52
|
+
4. Leave `GEISTDOCS_CHAT_PROXY_TOKEN` unset unless you replace the platform proxy with a custom bearer-authenticated proxy.
|
|
53
|
+
|
|
54
|
+
The Vertex deployment does not need a Geistdocs-specific environment variable. Access is controlled by Trusted Sources and the OIDC token forwarded by the platform proxy.
|
|
55
|
+
|
|
25
56
|
## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`
|
|
26
57
|
|
|
27
58
|
The production URL of the Geistdocs site. This is automatically set when deploying to Vercel.
|
|
@@ -5,11 +5,12 @@ type: guide
|
|
|
5
5
|
summary: Create a Geistdocs project, run it locally, and edit your first documentation page.
|
|
6
6
|
related:
|
|
7
7
|
- /docs/configuration
|
|
8
|
+
- /docs/migration
|
|
8
9
|
- /docs/syntax
|
|
9
10
|
- /docs/deployment
|
|
10
11
|
---
|
|
11
12
|
|
|
12
|
-
Create a Geistdocs site with the package CLI, then edit the generated content and configuration files.
|
|
13
|
+
Create a Geistdocs site with the package CLI, then edit the generated content and configuration files. If you already have a Fumadocs or custom Geist docs site, read [Migration guide](/docs/migration) before moving route adapters and middleware behavior.
|
|
13
14
|
|
|
14
15
|
<CopyPrompt text="Create a Geistdocs project with pnpm dlx @vercel/geistdocs init --name my-docs. Then open my-docs, run pnpm dev, and explain which files I should edit first: geistdocs.tsx, content/docs, content/docs/meta.json, and components/geistdocs/mdx-components.tsx.">
|
|
15
16
|
Create a Geistdocs project with `pnpm dlx @vercel/geistdocs init --name my-docs`. Then open `my-docs`, run `pnpm dev`, and explain which files I should edit first: `geistdocs.tsx`, `content/docs`, `content/docs/meta.json`, and `components/geistdocs/mdx-components.tsx`.
|
|
@@ -39,6 +40,12 @@ npx @vercel/geistdocs init --name my-docs
|
|
|
39
40
|
|
|
40
41
|
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.
|
|
41
42
|
|
|
43
|
+
## Understand generated dependencies
|
|
44
|
+
|
|
45
|
+
Generated projects include `@vercel/geistdocs`, `ai` v6, and `@ai-sdk/react` v3. Geistdocs uses those AI SDK packages for Ask AI, including the chat client transport and `createChatRoute` server behavior.
|
|
46
|
+
|
|
47
|
+
Update Ask AI by updating `@vercel/geistdocs`, not by copying package chat internals into the app. If your project uses the AI SDK directly for separate product features, keep that code compatible with the app's installed AI SDK version; package-owned Ask AI does not need to match another consumer project's `ai` version.
|
|
48
|
+
|
|
42
49
|
## Start the development server
|
|
43
50
|
|
|
44
51
|
Open the generated project and start Next.js:
|
|
@@ -5,6 +5,7 @@ type: overview
|
|
|
5
5
|
summary: Geistdocs is a packaged documentation system for creating Next.js and Fumadocs sites with shared runtime features.
|
|
6
6
|
related:
|
|
7
7
|
- /docs/getting-started
|
|
8
|
+
- /docs/migration
|
|
8
9
|
- /docs/configuration
|
|
9
10
|
---
|
|
10
11
|
|
|
@@ -66,6 +67,8 @@ Most projects start by editing these files:
|
|
|
66
67
|
|
|
67
68
|
The package owns shared behavior such as docs rendering, page actions, search, Ask AI, markdown routes, `llms.txt`, and reusable MDX components. Updating `@vercel/geistdocs` gives your project package-level fixes and features without overwriting user-owned adapter files.
|
|
68
69
|
|
|
70
|
+
Ask AI uses AI SDK v6 through package-managed client and server code. Generated projects include `ai` v6 and `@ai-sdk/react` v3 so the package chat UI and `createChatRoute` use the supported AI SDK APIs.
|
|
71
|
+
|
|
69
72
|
Advanced projects can use package APIs for versioned docs, multiple content sources, custom page metadata, and custom proxy hooks while keeping runtime behavior in `@vercel/geistdocs`.
|
|
70
73
|
|
|
71
74
|
## Included features
|
|
@@ -74,6 +77,7 @@ Advanced projects can use package APIs for versioned docs, multiple content sour
|
|
|
74
77
|
- Local content in `content/docs`
|
|
75
78
|
- Search and Ask AI
|
|
76
79
|
- Page actions, including feedback, copy page, open in chat, and edit on GitHub
|
|
80
|
+
- Agent-readiness metadata with `/agents.md`
|
|
77
81
|
- Raw Markdown routes for AI tools
|
|
78
82
|
- `llms.txt`
|
|
79
83
|
- Versioned docs and multiple content sources
|
|
@@ -86,6 +90,7 @@ Advanced projects can use package APIs for versioned docs, multiple content sour
|
|
|
86
90
|
## Next steps
|
|
87
91
|
|
|
88
92
|
- Follow [Getting Started](/docs/getting-started) to create and run a project.
|
|
93
|
+
- Read [Migration guide](/docs/migration) to move an existing docs site to package-backed Geistdocs.
|
|
89
94
|
- Read [Configuration](/docs/configuration) to customize the generated site.
|
|
90
95
|
- Read [Versioned docs](/docs/versioned-docs) to configure multiple docs versions.
|
|
91
96
|
- Read [Proxy and markdown routes](/docs/proxy) to add custom request logic.
|
|
@@ -4,6 +4,7 @@ description: A single file containing all your documentation in plain text for A
|
|
|
4
4
|
type: conceptual
|
|
5
5
|
summary: A single endpoint that returns all documentation as plain Markdown text following the llms.txt standard.
|
|
6
6
|
related:
|
|
7
|
+
- /docs/agent-readiness
|
|
7
8
|
- /docs/md
|
|
8
9
|
- /docs/ask-ai
|
|
9
10
|
- /docs/proxy
|
|
@@ -4,6 +4,7 @@ description: Access documentation pages as raw Markdown by appending .md or .mdx
|
|
|
4
4
|
type: conceptual
|
|
5
5
|
summary: Access any documentation page as raw Markdown by appending .md or .mdx to the URL for AI tool consumption.
|
|
6
6
|
related:
|
|
7
|
+
- /docs/agent-readiness
|
|
7
8
|
- /docs/llms-txt
|
|
8
9
|
- /docs/proxy
|
|
9
10
|
---
|
|
@@ -64,7 +65,7 @@ import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
|
64
65
|
|
|
65
66
|
export const { GET, generateStaticParams, revalidate } =
|
|
66
67
|
createDocsMarkdownRoute({
|
|
67
|
-
|
|
68
|
+
sources: [geistdocsSource],
|
|
68
69
|
});
|
|
69
70
|
```
|
|
70
71
|
|