@vercel/geistdocs 1.3.0-canary.88e35b7 → 1.3.1
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 +5 -0
- package/dist/assets/logos/logo-svelte-kit.d.ts.map +1 -0
- package/dist/assets/logos/logo-svelte-kit.js +4 -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 +2 -5
- 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.d.ts.map +1 -1
- package/dist/components/code-block.js +7 -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.d.ts +11 -0
- package/dist/components/copy-prompt.d.ts.map +1 -0
- package/dist/components/copy-prompt.js +58 -0
- 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 +66 -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 +1 -2
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +28 -11
- 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 +9 -0
- package/dist/internal/provider-client.d.ts.map +1 -0
- package/dist/internal/provider-client.js +24 -0
- package/dist/internal/sidebar.d.ts +4 -1
- package/dist/internal/sidebar.d.ts.map +1 -1
- package/dist/internal/sidebar.js +8 -7
- package/dist/internal/table-of-contents.d.ts +9 -0
- package/dist/internal/table-of-contents.d.ts.map +1 -0
- package/dist/internal/table-of-contents.js +5 -0
- 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/layout.d.ts +4 -8
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +26 -44
- package/dist/mdx.d.ts +55 -24
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +9 -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 +33 -5
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +57 -22
- package/dist/proxy.d.ts +24 -8
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +116 -36
- 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 +11 -5
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +386 -65
- package/dist/routes/llms.d.ts +29 -10
- package/dist/routes/llms.d.ts.map +1 -1
- package/dist/routes/llms.js +80 -9
- package/dist/routes/search.d.ts +8 -5
- package/dist/routes/search.d.ts.map +1 -1
- package/dist/routes/search.js +52 -4
- package/dist/routes/sitemap.d.ts +15 -3
- package/dist/routes/sitemap.d.ts.map +1 -1
- package/dist/routes/sitemap.js +32 -6
- 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/sidebar.d.ts +11 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +16 -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 +155 -4
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +73 -3
- package/dist/versions.d.ts +45 -0
- package/dist/versions.d.ts.map +1 -0
- package/dist/versions.js +79 -0
- package/package.json +142 -9
- 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]/llms.txt/route.ts +1 -1
- package/template/app/[lang]/sitemap.md/route.ts +2 -2
- package/template/app/api/chat/route.ts +12 -1
- package/template/app/api/search/route.ts +2 -2
- package/template/app/styles/geistdocs.css +151 -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 +61 -5
- package/template/content/docs/configuration.cn.mdx +47 -7
- package/template/content/docs/configuration.mdx +226 -66
- package/template/content/docs/deployment.mdx +17 -0
- package/template/content/docs/edit-on-github.mdx +6 -2
- package/template/content/docs/env.mdx +38 -3
- package/template/content/docs/feedback.mdx +6 -2
- package/template/content/docs/getting-started.cn.mdx +2 -2
- package/template/content/docs/getting-started.mdx +71 -43
- package/template/content/docs/index.cn.mdx +36 -33
- package/template/content/docs/index.mdx +69 -59
- package/template/content/docs/internationalization.cn.mdx +7 -9
- package/template/content/docs/internationalization.mdx +10 -5
- package/template/content/docs/llms-txt.cn.mdx +24 -2
- package/template/content/docs/llms-txt.mdx +48 -12
- package/template/content/docs/md.cn.mdx +12 -15
- package/template/content/docs/md.mdx +30 -16
- package/template/content/docs/meta.json +6 -2
- package/template/content/docs/migration.mdx +364 -0
- package/template/content/docs/open-in-chat.mdx +12 -10
- package/template/content/docs/provider.cn.mdx +6 -5
- package/template/content/docs/provider.mdx +13 -8
- package/template/content/docs/proxy.cn.mdx +96 -0
- package/template/content/docs/proxy.mdx +178 -0
- package/template/content/docs/rss.mdx +6 -2
- package/template/content/docs/syntax.cn.mdx +2 -2
- package/template/content/docs/syntax.mdx +6 -2
- package/template/content/docs/theme-aware-image.mdx +5 -1
- package/template/content/docs/versioned-docs.cn.mdx +117 -0
- package/template/content/docs/versioned-docs.mdx +228 -0
- package/template/geistdocs.tsx +26 -0
- package/template/lib/geistdocs/config.tsx +3 -0
- package/template/package.json +5 -5
- package/template/proxy.ts +2 -1
- 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 -81
- 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
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 配置
|
|
3
|
-
description:
|
|
3
|
+
description: 通过本地 adapter 文件和包 API 配置 Geistdocs 站点
|
|
4
4
|
type: reference
|
|
5
|
-
summary:
|
|
5
|
+
summary: 配置站点 metadata、导航、AI 功能、页面操作、翻译和本地 adapters。
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/getting-started
|
|
8
8
|
related:
|
|
9
9
|
- /docs/provider
|
|
10
10
|
- /docs/env
|
|
11
|
+
- /docs/versioned-docs
|
|
12
|
+
- /docs/proxy
|
|
11
13
|
---
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
为此,Geistdocs 使用一个根级配置文件,让您可以在不接触源代码的情况下自定义文档站点。
|
|
15
|
+
通过生成项目中你拥有的文件配置 Geistdocs。运行时功能来自 `@vercel/geistdocs`,本地文件控制内容、品牌、路由 adapters 和可选自定义。
|
|
16
16
|
|
|
17
17
|
## 配置文件
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
| File | Purpose |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| `geistdocs.tsx` | 站点级设置,包括 logo、nav、GitHub 仓库、AI prompt、翻译和功能开关。 |
|
|
22
|
+
| `lib/geistdocs/config.tsx` | 使用 `defineConfig` 将 `geistdocs.tsx` exports 转换为包配置。 |
|
|
23
|
+
| `lib/geistdocs/source.ts` | 将 Fumadocs content collections 连接到包 source adapter。 |
|
|
24
|
+
| `components/geistdocs/mdx-components.tsx` | 添加或覆盖 MDX 组件。 |
|
|
25
|
+
| `app/[lang]/docs/[[...slug]]/page.tsx` | 配置包提供的 docs page renderer。 |
|
|
26
|
+
| `proxy.ts` | 配置 Markdown 协商、AI-agent 重写、请求追踪和自定义 request hooks。 |
|
|
27
|
+
| `content/docs/meta.json` | 控制侧边栏顺序和分组标签。 |
|
|
28
|
+
|
|
29
|
+
## `geistdocs.tsx`
|
|
30
|
+
|
|
31
|
+
项目根目录下的 `geistdocs.tsx` 文件包含主要自定义选项:
|
|
20
32
|
|
|
21
33
|
```tsx title="geistdocs.tsx"
|
|
22
34
|
import { BookHeartIcon } from "lucide-react";
|
|
@@ -112,4 +124,32 @@ export const title = "Your Product Documentation";
|
|
|
112
124
|
```tsx title="geistdocs.tsx"
|
|
113
125
|
export const prompt =
|
|
114
126
|
"You are a helpful assistant specializing in answering questions about Your Product, a platform for building amazing applications.";
|
|
115
|
-
```
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## 高级配置
|
|
130
|
+
|
|
131
|
+
`lib/geistdocs/config.tsx` 可以添加 `content` 和 `versions` metadata,让本地 adapters 和自定义 UI 共用同一个配置对象:
|
|
132
|
+
|
|
133
|
+
```tsx title="lib/geistdocs/config.tsx"
|
|
134
|
+
export const config = defineConfig({
|
|
135
|
+
// ...
|
|
136
|
+
content: [
|
|
137
|
+
{ id: "docs", label: "Docs", dir: "content/docs", route: "/docs" },
|
|
138
|
+
{
|
|
139
|
+
id: "cookbook",
|
|
140
|
+
label: "Cookbook",
|
|
141
|
+
dir: "content/cookbook",
|
|
142
|
+
route: "/cookbook",
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
versions: {
|
|
146
|
+
current: "v6",
|
|
147
|
+
items: [
|
|
148
|
+
{ id: "v6", label: "v6 latest" },
|
|
149
|
+
{ id: "v5", label: "v5", href: "https://v5.example.com/:path*" },
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
阅读 [版本化文档](/docs/versioned-docs) 配置 versioned sources,阅读 [Proxy 和 Markdown 路由](/docs/proxy) 配置 route mappings。
|
|
@@ -1,115 +1,275 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Configuration
|
|
3
|
-
description:
|
|
3
|
+
description: Configure a Geistdocs site through local adapter files and package APIs
|
|
4
4
|
type: reference
|
|
5
|
-
summary:
|
|
5
|
+
summary: Configure site metadata, navigation, AI features, page actions, translations, and local adapters.
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/getting-started
|
|
8
8
|
related:
|
|
9
|
+
- /docs/migration
|
|
9
10
|
- /docs/provider
|
|
10
11
|
- /docs/env
|
|
12
|
+
- /docs/versioned-docs
|
|
13
|
+
- /docs/proxy
|
|
11
14
|
---
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Configure Geistdocs through user-owned files in the generated project. Runtime features come from `@vercel/geistdocs`, while your local files control content, branding, routing adapters, and opt-in customization.
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
<CopyPrompt text="Review this Geistdocs project configuration. Explain what each export in geistdocs.tsx does, identify which features are enabled, and suggest safe customizations that do not require editing package internals.">
|
|
19
|
+
Review this Geistdocs project configuration. Explain what each export in `geistdocs.tsx` does, identify which features are enabled, and suggest safe customizations that do not require editing package internals.
|
|
20
|
+
</CopyPrompt>
|
|
16
21
|
|
|
17
|
-
## Configuration
|
|
22
|
+
## Configuration files
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
| File | Purpose |
|
|
25
|
+
| --- | --- |
|
|
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. |
|
|
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. |
|
|
30
|
+
| `lib/geistdocs/source.ts` | Connects Fumadocs content collections to the package source adapter. |
|
|
31
|
+
| `components/geistdocs/mdx-components.tsx` | Adds or overrides MDX components. |
|
|
32
|
+
| `components/geistdocs/docs-layout.tsx` | Customizes the package-backed docs layout, including optional sidebar content. |
|
|
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. |
|
|
35
|
+
| `app/[lang]/llms.txt/route.ts` | Configures the all-docs Markdown endpoint. |
|
|
36
|
+
| `app/[lang]/llms.mdx/[[...slug]]/route.ts` | Configures single-page Markdown responses. |
|
|
37
|
+
| `proxy.ts` | Configures markdown negotiation, AI-agent rewrites, request tracking, and custom request hooks. |
|
|
38
|
+
| `content/docs/meta.json` | Controls sidebar order and section labels. |
|
|
39
|
+
|
|
40
|
+
## `geistdocs.tsx`
|
|
41
|
+
|
|
42
|
+
The root `geistdocs.tsx` file is the primary configuration surface:
|
|
20
43
|
|
|
21
44
|
```tsx title="geistdocs.tsx"
|
|
22
|
-
|
|
45
|
+
export const Logo = () => <span>My Docs</span>;
|
|
23
46
|
|
|
24
|
-
export const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
47
|
+
export const github = {
|
|
48
|
+
owner: "my-org",
|
|
49
|
+
repo: "my-repo",
|
|
50
|
+
branch: "main",
|
|
51
|
+
editPath: "content/docs/{path}",
|
|
52
|
+
};
|
|
30
53
|
|
|
31
54
|
export const nav = [
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
href: "/docs",
|
|
35
|
-
},
|
|
55
|
+
{ label: "Docs", href: "/docs" },
|
|
56
|
+
{ label: "GitHub", href: "https://github.com/my-org/my-repo" },
|
|
36
57
|
];
|
|
37
58
|
|
|
59
|
+
export const title = "My Documentation";
|
|
60
|
+
|
|
61
|
+
export const prompt =
|
|
62
|
+
"You are a helpful assistant that answers questions about My Documentation.";
|
|
63
|
+
|
|
38
64
|
export const suggestions = [
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"What is Fluid Compute?",
|
|
42
|
-
"How much does Vercel cost?",
|
|
65
|
+
"How do I get started?",
|
|
66
|
+
"How do I deploy?",
|
|
43
67
|
];
|
|
44
68
|
|
|
45
|
-
export const
|
|
69
|
+
export const agent = {
|
|
70
|
+
product: {
|
|
71
|
+
name: "My Product",
|
|
72
|
+
description: "My Product helps teams build and deploy applications.",
|
|
73
|
+
},
|
|
74
|
+
};
|
|
46
75
|
|
|
47
|
-
export const
|
|
48
|
-
|
|
76
|
+
export const translations = {
|
|
77
|
+
en: { displayName: "English" },
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const basePath: string | undefined = undefined;
|
|
81
|
+
export const siteId: string | undefined = undefined;
|
|
49
82
|
```
|
|
50
83
|
|
|
51
|
-
##
|
|
84
|
+
## `defineConfig`
|
|
52
85
|
|
|
53
|
-
|
|
86
|
+
`lib/geistdocs/config.tsx` converts your root exports into a package config. Most projects only need the generated defaults:
|
|
54
87
|
|
|
55
|
-
|
|
88
|
+
```tsx title="lib/geistdocs/config.tsx"
|
|
89
|
+
import { defineConfig } from "@vercel/geistdocs/config";
|
|
90
|
+
import {
|
|
91
|
+
agent,
|
|
92
|
+
basePath,
|
|
93
|
+
github,
|
|
94
|
+
Logo,
|
|
95
|
+
nav,
|
|
96
|
+
prompt,
|
|
97
|
+
siteId,
|
|
98
|
+
suggestions,
|
|
99
|
+
title,
|
|
100
|
+
translations,
|
|
101
|
+
} from "@/geistdocs";
|
|
56
102
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
103
|
+
export const config = defineConfig({
|
|
104
|
+
title,
|
|
105
|
+
agent,
|
|
106
|
+
defaultLanguage: "en",
|
|
107
|
+
logo: <Logo />,
|
|
108
|
+
github,
|
|
109
|
+
nav,
|
|
110
|
+
basePath,
|
|
111
|
+
siteId,
|
|
112
|
+
translations,
|
|
113
|
+
ai: {
|
|
114
|
+
prompt,
|
|
115
|
+
suggestions,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
64
118
|
```
|
|
65
119
|
|
|
66
|
-
|
|
120
|
+
Advanced sites can add `content` and `versions` metadata so local adapters and custom UI share one configuration object:
|
|
67
121
|
|
|
68
|
-
|
|
122
|
+
```tsx title="lib/geistdocs/config.tsx"
|
|
123
|
+
export const config = defineConfig({
|
|
124
|
+
// ...
|
|
125
|
+
content: [
|
|
126
|
+
{ id: "docs", label: "Docs", dir: "content/docs", route: "/docs" },
|
|
127
|
+
{
|
|
128
|
+
id: "cookbook",
|
|
129
|
+
label: "Cookbook",
|
|
130
|
+
dir: "content/cookbook",
|
|
131
|
+
route: "/cookbook",
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
versions: {
|
|
135
|
+
current: "v6",
|
|
136
|
+
items: [
|
|
137
|
+
{ id: "v6", label: "v6 latest" },
|
|
138
|
+
{ id: "v5", label: "v5", href: "https://v5.example.com/:path*" },
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
```
|
|
69
143
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
144
|
+
Use [Versioned docs](/docs/versioned-docs) for versioned source setup and [Proxy and markdown routes](/docs/proxy) for route mappings.
|
|
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,
|
|
75
168
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
+
|
|
176
|
+
## Page actions
|
|
177
|
+
|
|
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`:
|
|
179
|
+
|
|
180
|
+
```tsx title="lib/geistdocs/config.tsx"
|
|
181
|
+
export const config = defineConfig({
|
|
182
|
+
// ...
|
|
183
|
+
pageActions: {
|
|
184
|
+
editSource: false,
|
|
185
|
+
scrollTop: true,
|
|
186
|
+
copyPage: true,
|
|
187
|
+
askAI: true,
|
|
188
|
+
openInChat: false,
|
|
79
189
|
},
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
href: "https://github.com/your-org/your-repo",
|
|
190
|
+
feedback: {
|
|
191
|
+
enabled: false,
|
|
83
192
|
},
|
|
84
|
-
|
|
193
|
+
});
|
|
85
194
|
```
|
|
86
195
|
|
|
87
|
-
|
|
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}`.
|
|
88
197
|
|
|
89
|
-
|
|
198
|
+
## Page visibility
|
|
90
199
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
+
---
|
|
98
219
|
```
|
|
99
220
|
|
|
100
|
-
|
|
221
|
+
Optional `tags`, `keywords`, and `canonical` frontmatter are also recognized by the package runtime.
|
|
101
222
|
|
|
102
|
-
|
|
223
|
+
## User-owned adapters
|
|
103
224
|
|
|
104
|
-
|
|
105
|
-
|
|
225
|
+
Adapter files are safe to edit. Package updates do not overwrite them.
|
|
226
|
+
|
|
227
|
+
For example, add a custom MDX component:
|
|
228
|
+
|
|
229
|
+
```tsx title="components/geistdocs/mdx-components.tsx"
|
|
230
|
+
import { createMdxComponents } from "@vercel/geistdocs/mdx";
|
|
231
|
+
import type { MDXComponents } from "mdx/types";
|
|
232
|
+
|
|
233
|
+
const ProductCard = ({ name }: { name: string }) => <div>{name}</div>;
|
|
234
|
+
|
|
235
|
+
export const getMDXComponents = (components?: MDXComponents): MDXComponents =>
|
|
236
|
+
createMdxComponents({
|
|
237
|
+
ProductCard,
|
|
238
|
+
...components,
|
|
239
|
+
});
|
|
106
240
|
```
|
|
107
241
|
|
|
108
|
-
|
|
242
|
+
Then use it in MDX:
|
|
109
243
|
|
|
110
|
-
|
|
244
|
+
```mdx
|
|
245
|
+
<ProductCard name="My product" />
|
|
246
|
+
```
|
|
111
247
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
248
|
+
## Docs page adapter
|
|
249
|
+
|
|
250
|
+
`createDocsPage` accepts hooks for route-specific behavior:
|
|
251
|
+
|
|
252
|
+
```tsx title="app/[lang]/docs/[[...slug]]/page.tsx"
|
|
253
|
+
const docsPage = createDocsPage({
|
|
254
|
+
config,
|
|
255
|
+
source: geistdocsSource,
|
|
256
|
+
getPageUrl: ({ page }) => page.url,
|
|
257
|
+
openGraph: {
|
|
258
|
+
images: true,
|
|
259
|
+
},
|
|
260
|
+
metadata: ({ metadata }) => metadata,
|
|
261
|
+
mdx: ({ link }) => getMDXComponents({ a: link }),
|
|
262
|
+
});
|
|
115
263
|
```
|
|
264
|
+
|
|
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.
|
|
266
|
+
|
|
267
|
+
## Package-owned runtime
|
|
268
|
+
|
|
269
|
+
Do not edit files inside `node_modules/@vercel/geistdocs`. Update the package instead:
|
|
270
|
+
|
|
271
|
+
```bash title="Terminal"
|
|
272
|
+
pnpm exec geistdocs update
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
If a release adds an optional prop or config field, opt into it by editing the relevant local adapter file. Existing adapters should keep compiling unless a release includes a breaking API change.
|
|
@@ -10,6 +10,12 @@ related:
|
|
|
10
10
|
- /docs/configuration
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
Deploy a Geistdocs site to Vercel as a Next.js app. Make sure your package dependency, environment variables, and production URL are configured before shipping.
|
|
14
|
+
|
|
15
|
+
<CopyPrompt text="Help me deploy this Geistdocs project to Vercel. Check the package scripts, required environment variables, and Vercel project settings, then give me a deploy checklist for production.">
|
|
16
|
+
Help me deploy this Geistdocs project to Vercel. Check the package scripts, required environment variables, and Vercel project settings, then give me a deploy checklist for production.
|
|
17
|
+
</CopyPrompt>
|
|
18
|
+
|
|
13
19
|
## Prerequisites
|
|
14
20
|
|
|
15
21
|
Before deploying, you need:
|
|
@@ -32,3 +38,14 @@ To deploy from the Vercel dashboard:
|
|
|
32
38
|
- **Install Command**: `pnpm install` or `npm install`
|
|
33
39
|
4. Add your environment variables (see [Environment Variables](/docs/env))
|
|
34
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.
|
|
@@ -7,9 +7,13 @@ related:
|
|
|
7
7
|
- /docs/configuration
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
The "Edit on GitHub" feature
|
|
10
|
+
The "Edit on GitHub" feature gives readers a direct link to propose documentation changes. This link appears in the table of contents sidebar on every documentation page.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
<CopyPrompt text="Help me configure Edit on GitHub for this Geistdocs site. Check the github owner and repo in geistdocs.tsx, verify the generated edit URL for this page, and tell me how to disable the action if needed.">
|
|
13
|
+
Help me configure Edit on GitHub for this Geistdocs site. Check the `github` owner and repo in `geistdocs.tsx`, verify the generated edit URL for this page, and tell me how to disable the action if needed.
|
|
14
|
+
</CopyPrompt>
|
|
15
|
+
|
|
16
|
+
## How it works
|
|
13
17
|
|
|
14
18
|
When users click the "Edit this page on GitHub" link, they are taken directly to the source file in your GitHub repository. From there, they can:
|
|
15
19
|
|
|
@@ -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,14 +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
|
+
|
|
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
|
+
</CopyPrompt>
|
|
14
18
|
|
|
15
19
|
## `AI_GATEWAY_API_KEY`
|
|
16
20
|
|
|
17
|
-
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.
|
|
18
22
|
|
|
19
23
|
<Callout>This is automatically set when deploying to Vercel.</Callout>
|
|
20
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
|
+
|
|
21
56
|
## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`
|
|
22
57
|
|
|
23
58
|
The production URL of the Geistdocs site. This is automatically set when deploying to Vercel.
|
|
@@ -10,9 +10,13 @@ related:
|
|
|
10
10
|
- /docs/configuration
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
The Feedback feature
|
|
13
|
+
The Feedback feature lets readers share page-level feedback through an interactive widget. Feedback is posted to a centralized GitHub repository as issues so your team can track, label, and respond to user input.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
<CopyPrompt text="Help me configure feedback for this Geistdocs project. Check whether feedback is enabled, what siteId label is used, and how feedback is sent to the Geistdocs platform and GitHub issues.">
|
|
16
|
+
Help me configure feedback for this Geistdocs project. Check whether feedback is enabled, what `siteId` label is used, and how feedback is sent to the Geistdocs platform and GitHub issues.
|
|
17
|
+
</CopyPrompt>
|
|
18
|
+
|
|
19
|
+
## How it works
|
|
16
20
|
|
|
17
21
|
The feedback widget appears in the table of contents sidebar on every documentation page. When users click "Give feedback", they can:
|
|
18
22
|
|
|
@@ -64,7 +64,7 @@ description: 这是我的第一个文档页面
|
|
|
64
64
|
|
|
65
65
|
# My First Page
|
|
66
66
|
|
|
67
|
-
Welcome to my documentation!
|
|
67
|
+
Welcome to my documentation! Find this page at `/docs/my-first-page`.
|
|
68
68
|
|
|
69
69
|
## Features
|
|
70
70
|
|
|
@@ -83,4 +83,4 @@ console.log(greeting("World"));
|
|
|
83
83
|
```
|
|
84
84
|
````
|
|
85
85
|
|
|
86
|
-
在 [语法](/docs/syntax) 部分了解有关可用语法的更多信息。
|
|
86
|
+
在 [语法](/docs/syntax) 部分了解有关可用语法的更多信息。
|