@vercel/geistdocs 1.3.0-canary.88e35b7 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/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 +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,86 +1,114 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Getting Started
|
|
3
|
-
description:
|
|
3
|
+
description: Create a Geistdocs project and start writing documentation
|
|
4
4
|
type: guide
|
|
5
|
-
summary:
|
|
5
|
+
summary: Create a Geistdocs project, run it locally, and edit your first documentation page.
|
|
6
6
|
related:
|
|
7
|
-
- /docs/
|
|
7
|
+
- /docs/configuration
|
|
8
|
+
- /docs/migration
|
|
8
9
|
- /docs/syntax
|
|
9
10
|
- /docs/deployment
|
|
10
11
|
---
|
|
11
12
|
|
|
12
|
-
|
|
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.">
|
|
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`.
|
|
17
|
+
</CopyPrompt>
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
## Prerequisites
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
- **pnpm** (recommended) or your favorite npm package manager
|
|
20
|
-
- A **GitHub account** for repository hosting
|
|
21
|
-
- Basic familiarity with **MDX**, **Next.js**, and **React**
|
|
21
|
+
Before you begin, install:
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
- Node.js 18 or later
|
|
24
|
+
- pnpm, npm, or another package manager
|
|
25
|
+
- Git
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
## Create a project
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
Run the Geistdocs CLI from an empty parent folder:
|
|
28
30
|
|
|
29
31
|
```bash title="Terminal"
|
|
30
|
-
|
|
32
|
+
pnpm dlx @vercel/geistdocs init --name my-docs
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
### 2. Configure Environment Variables
|
|
36
|
-
|
|
37
|
-
Copy the example environment file:
|
|
35
|
+
You can also use npm:
|
|
38
36
|
|
|
39
37
|
```bash title="Terminal"
|
|
40
|
-
|
|
38
|
+
npx @vercel/geistdocs init --name my-docs
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-
|
|
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.
|
|
42
|
+
|
|
43
|
+
## Understand generated dependencies
|
|
44
44
|
|
|
45
|
-
|
|
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
46
|
|
|
47
|
-
|
|
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
|
+
|
|
49
|
+
## Start the development server
|
|
50
|
+
|
|
51
|
+
Open the generated project and start Next.js:
|
|
48
52
|
|
|
49
53
|
```bash title="Terminal"
|
|
54
|
+
cd my-docs
|
|
50
55
|
pnpm dev
|
|
51
56
|
```
|
|
52
57
|
|
|
53
|
-
Open
|
|
58
|
+
Open `http://localhost:3000` in your browser.
|
|
54
59
|
|
|
55
|
-
|
|
60
|
+
## Edit your first page
|
|
56
61
|
|
|
57
|
-
|
|
62
|
+
Docs live in `content/docs`. Edit the overview page:
|
|
58
63
|
|
|
59
|
-
|
|
64
|
+
```mdx title="content/docs/index.mdx"
|
|
60
65
|
---
|
|
61
|
-
title:
|
|
62
|
-
description:
|
|
66
|
+
title: Overview
|
|
67
|
+
description: Learn how to use my project.
|
|
63
68
|
---
|
|
64
69
|
|
|
65
|
-
|
|
70
|
+
My project helps developers build with clear documentation.
|
|
66
71
|
|
|
67
|
-
|
|
72
|
+
## Start here
|
|
68
73
|
|
|
69
|
-
|
|
74
|
+
Add the first workflow you want readers to complete.
|
|
75
|
+
```
|
|
70
76
|
|
|
71
|
-
|
|
72
|
-
- Full React component support
|
|
73
|
-
- Automatic navigation generation
|
|
77
|
+
Add more pages by creating new `.mdx` files in `content/docs`.
|
|
74
78
|
|
|
75
|
-
##
|
|
79
|
+
## Update the sidebar
|
|
76
80
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
Use `content/docs/meta.json` to control page order and groups:
|
|
82
|
+
|
|
83
|
+
```json title="content/docs/meta.json"
|
|
84
|
+
{
|
|
85
|
+
"title": "Documentation",
|
|
86
|
+
"root": true,
|
|
87
|
+
"pages": ["index", "getting-started", "---Guides---", "deploy"]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
81
90
|
|
|
82
|
-
|
|
91
|
+
## Configure the site
|
|
92
|
+
|
|
93
|
+
Use `geistdocs.tsx` to customize the site shell:
|
|
94
|
+
|
|
95
|
+
```tsx title="geistdocs.tsx"
|
|
96
|
+
export const title = "My Documentation";
|
|
97
|
+
|
|
98
|
+
export const nav = [
|
|
99
|
+
{ label: "Docs", href: "/docs" },
|
|
100
|
+
{ label: "GitHub", href: "https://github.com/my-org/my-repo" },
|
|
101
|
+
];
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Read [Configuration](/docs/configuration) for the full configuration surface.
|
|
105
|
+
|
|
106
|
+
## Update Geistdocs
|
|
107
|
+
|
|
108
|
+
For package-based projects, `geistdocs update` updates the `@vercel/geistdocs` package version. It does not overwrite your local content or adapter files.
|
|
109
|
+
|
|
110
|
+
```bash title="Terminal"
|
|
111
|
+
pnpm exec geistdocs update
|
|
83
112
|
```
|
|
84
|
-
````
|
|
85
113
|
|
|
86
|
-
|
|
114
|
+
Review and test dependency changes before committing.
|
|
@@ -1,54 +1,57 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 概述
|
|
3
|
-
description:
|
|
3
|
+
description: 了解 Geistdocs 如何将 CLI、运行时和模板打包为文档站点
|
|
4
4
|
type: overview
|
|
5
|
-
summary:
|
|
5
|
+
summary: Geistdocs 是一个打包的文档系统,用于创建带共享运行时功能的 Next.js 和 Fumadocs 站点。
|
|
6
6
|
related:
|
|
7
7
|
- /docs/getting-started
|
|
8
8
|
- /docs/configuration
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Geistdocs
|
|
11
|
+
Geistdocs 是一个基于 Next.js、Fumadocs 和 Vercel 文档模式的打包文档系统。使用它创建一个本地保存内容、运行时由包管理的文档站点。
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Geistdocs 的工作方式
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## 使用场景
|
|
18
|
-
|
|
19
|
-
该模板非常适合:
|
|
15
|
+
Geistdocs 由三部分组成:
|
|
20
16
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
- **内部维基** - 团队知识库和指南
|
|
25
|
-
- **项目文档** - 开源项目文档
|
|
17
|
+
- `@vercel/geistdocs`:提供 CLI、运行时组件、route helpers、MDX 组件、页面操作和打包模板的 npm package。
|
|
18
|
+
- 本地 adapter 文件:生成项目中的文件,用于连接配置、内容 source、路由和 UI 自定义。
|
|
19
|
+
- 平台服务:`geistdocs.com` 上的可选翻译、反馈和 Markdown 请求追踪端点。
|
|
26
20
|
|
|
27
|
-
##
|
|
21
|
+
## 你会编辑的文件
|
|
28
22
|
|
|
29
|
-
|
|
23
|
+
大多数项目从这些文件开始:
|
|
30
24
|
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
33
|
-
- `
|
|
25
|
+
- `content/docs`:编写和组织文档。
|
|
26
|
+
- `content/docs/meta.json`:控制侧边栏顺序和分组。
|
|
27
|
+
- `geistdocs.tsx`:配置 logo、nav、GitHub 仓库、标题、AI prompt、翻译和功能开关。
|
|
28
|
+
- `components/geistdocs/mdx-components.tsx`:添加或覆盖 MDX 组件。
|
|
29
|
+
- `app/[lang]/docs/[[...slug]]/page.tsx`:配置文档页面行为。
|
|
30
|
+
- `proxy.ts`:在包管理的 Markdown 协商前后添加站点特有的请求逻辑。
|
|
34
31
|
|
|
35
|
-
|
|
36
|
-
graph TD
|
|
37
|
-
root[geistdocs/]
|
|
32
|
+
## 包负责的内容
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
root --> packages[packages/]
|
|
34
|
+
包负责文档渲染、页面操作、搜索、Ask AI、Markdown 路由、`llms.txt` 和可复用 MDX 组件等共享行为。更新 `@vercel/geistdocs` 可以获得包级别修复和功能,而不会覆盖你拥有的 adapter 文件。
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
apps --> platform[platform/]
|
|
36
|
+
高级项目可以使用包 API 配置版本化文档、多个内容 source、自定义页面 metadata 和自定义 proxy hooks。
|
|
44
37
|
|
|
45
|
-
|
|
46
|
-
```
|
|
38
|
+
## 包含的功能
|
|
47
39
|
|
|
48
|
-
|
|
40
|
+
- MDX 文档和自定义组件
|
|
41
|
+
- `content/docs` 中的本地内容
|
|
42
|
+
- 搜索和 Ask AI
|
|
43
|
+
- 页面操作,包括反馈、复制页面、在 chat 中打开和在 GitHub 编辑
|
|
44
|
+
- 面向 AI 工具的原始 Markdown 路由
|
|
45
|
+
- `llms.txt`
|
|
46
|
+
- 版本化文档和多个内容 source
|
|
47
|
+
- 用于自定义请求逻辑的 proxy hooks
|
|
48
|
+
- RSS feed
|
|
49
|
+
- 国际化路由
|
|
50
|
+
- init、update 和 translate CLI 命令
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
## 下一步
|
|
51
53
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
54
|
+
- 阅读 [Getting Started](/docs/getting-started) 创建并运行项目。
|
|
55
|
+
- 阅读 [Configuration](/docs/configuration) 自定义生成的站点。
|
|
56
|
+
- 阅读 [版本化文档](/docs/versioned-docs) 配置多个文档版本。
|
|
57
|
+
- 阅读 [Proxy 和 Markdown 路由](/docs/proxy) 添加自定义请求逻辑。
|
|
@@ -1,87 +1,97 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Overview
|
|
3
|
-
description:
|
|
3
|
+
description: Learn how Geistdocs packages the CLI, runtime, and template for documentation sites
|
|
4
4
|
type: overview
|
|
5
|
-
summary:
|
|
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
|
|
|
11
|
-
Geistdocs is a
|
|
12
|
+
Geistdocs is a packaged documentation system built with Next.js, Fumadocs, and shared Vercel documentation patterns. Use it to create a docs site with local content files and package-managed runtime features.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
<CopyPrompt text="Help me understand this Geistdocs project. Explain how the @vercel/geistdocs package, local adapter files, and content/docs folder work together, then suggest the first files I should edit for my documentation site.">
|
|
15
|
+
Help me understand this Geistdocs project. Explain how the `@vercel/geistdocs` package, local adapter files, and `content/docs` folder work together, then suggest the first files I should edit for my documentation site.
|
|
16
|
+
</CopyPrompt>
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
## How Geistdocs works
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
Geistdocs has three main parts:
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
- **API documentation** - Endpoint documentation with code examples
|
|
23
|
-
- **Developer tools** - CLI tools, SDKs, and framework documentation
|
|
24
|
-
- **Internal wikis** - Team knowledge bases and guides
|
|
25
|
-
- **Project documentation** - Open source project documentation
|
|
26
|
-
|
|
27
|
-
## What's Included
|
|
28
|
-
|
|
29
|
-
Geistdocs is comprised of three main parts:
|
|
30
|
-
|
|
31
|
-
- `template` - The template you'll use to create your docs site.
|
|
32
|
-
- `platform` - The backend your docs site will use to handle feedback and translations.
|
|
33
|
-
- `cli` - The CLI for creating and managing your docs site.
|
|
22
|
+
- `@vercel/geistdocs`: The npm package that provides the CLI, runtime components, route helpers, MDX components, page actions, and bundled template.
|
|
23
|
+
- Local adapter files: The files in your generated project that connect your configuration, content source, routes, and UI customization to the package.
|
|
24
|
+
- Platform services: Hosted endpoints at `geistdocs.com` for optional translation, feedback, and markdown tracking features.
|
|
34
25
|
|
|
35
26
|
```mermaid
|
|
36
27
|
flowchart TB
|
|
37
|
-
subgraph
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
subgraph Package["@vercel/geistdocs package"]
|
|
29
|
+
cli["CLI: init, update, translate"]
|
|
30
|
+
runtime["Runtime: layout, routes, MDX, controls"]
|
|
31
|
+
bundledTemplate["Bundled template snapshot"]
|
|
41
32
|
end
|
|
42
33
|
|
|
43
|
-
subgraph
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
subgraph Template["apps/template"]
|
|
34
|
+
subgraph Site["Generated docs site"]
|
|
35
|
+
config["geistdocs.tsx"]
|
|
36
|
+
adapters["app/, components/geistdocs/, lib/geistdocs/"]
|
|
49
37
|
content["content/docs/*.mdx"]
|
|
50
|
-
localeContent["content/docs/*.locale.mdx"]
|
|
51
|
-
config["geistdocs.tsx\n(locale config)"]
|
|
52
|
-
feedback["Feedback Component"]
|
|
53
38
|
end
|
|
54
39
|
|
|
55
|
-
subgraph Platform["
|
|
56
|
-
|
|
57
|
-
|
|
40
|
+
subgraph Platform["Geistdocs platform"]
|
|
41
|
+
translate["/translate"]
|
|
42
|
+
feedback["/feedback"]
|
|
43
|
+
tracking["/md-tracking"]
|
|
58
44
|
end
|
|
59
45
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
46
|
+
cli --> bundledTemplate
|
|
47
|
+
bundledTemplate --> Site
|
|
48
|
+
adapters --> runtime
|
|
49
|
+
content --> adapters
|
|
50
|
+
cli --> translate
|
|
51
|
+
runtime --> feedback
|
|
52
|
+
runtime --> tracking
|
|
53
|
+
```
|
|
64
54
|
|
|
65
|
-
|
|
66
|
-
initCmd -->|"Downloads template"| Template
|
|
55
|
+
## What you edit
|
|
67
56
|
|
|
68
|
-
|
|
69
|
-
translateCmd -->|"Reads locales from"| config
|
|
70
|
-
translateCmd -->|"Reads source files"| content
|
|
71
|
-
translateCmd -->|"POST /translate"| translateAPI
|
|
72
|
-
translateAPI --> aigateway
|
|
73
|
-
translateAPI -->|"Returns translations"| translateCmd
|
|
74
|
-
translateCmd -->|"Writes translated files"| localeContent
|
|
57
|
+
Most projects start by editing these files:
|
|
75
58
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
59
|
+
- `content/docs`: Write and organize your docs.
|
|
60
|
+
- `content/docs/meta.json`: Control sidebar order and groups.
|
|
61
|
+
- `geistdocs.tsx`: Configure the logo, nav, GitHub repo, title, AI prompt, translations, and feature flags.
|
|
62
|
+
- `components/geistdocs/mdx-components.tsx`: Add or override MDX components.
|
|
63
|
+
- `app/[lang]/docs/[[...slug]]/page.tsx`: Configure docs page behavior, such as custom render hooks.
|
|
64
|
+
- `proxy.ts`: Add site-specific request logic before or after package-managed markdown negotiation.
|
|
65
|
+
|
|
66
|
+
## What the package owns
|
|
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.
|
|
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
|
+
|
|
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`.
|
|
73
|
+
|
|
74
|
+
## Included features
|
|
80
75
|
|
|
81
|
-
|
|
76
|
+
- MDX documentation with custom components
|
|
77
|
+
- Local content in `content/docs`
|
|
78
|
+
- Search and Ask AI
|
|
79
|
+
- Page actions, including feedback, copy page, open in chat, and edit on GitHub
|
|
80
|
+
- Agent-readiness metadata with `/agents.md`
|
|
81
|
+
- Raw Markdown routes for AI tools
|
|
82
|
+
- `llms.txt`
|
|
83
|
+
- Versioned docs and multiple content sources
|
|
84
|
+
- Proxy hooks for custom request logic
|
|
85
|
+
- RSS feed
|
|
86
|
+
- Theme-aware images
|
|
87
|
+
- Internationalized routes
|
|
88
|
+
- CLI commands for init, update, and translation
|
|
82
89
|
|
|
83
|
-
|
|
90
|
+
## Next steps
|
|
84
91
|
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
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.
|
|
94
|
+
- Read [Configuration](/docs/configuration) to customize the generated site.
|
|
95
|
+
- Read [Versioned docs](/docs/versioned-docs) to configure multiple docs versions.
|
|
96
|
+
- Read [Proxy and markdown routes](/docs/proxy) to add custom request logic.
|
|
97
|
+
- Read [Syntax](/docs/syntax) to write content with MDX components.
|
|
@@ -37,20 +37,18 @@ CLI 会从 `geistdocs.tsx` 中读取目标语言并提示您选择要翻译的
|
|
|
37
37
|
您可以直接传递选项以跳过交互式提示:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
# Translate
|
|
41
|
-
npx @vercel/geistdocs translate
|
|
40
|
+
# Translate files using the default glob pattern
|
|
41
|
+
npx @vercel/geistdocs translate
|
|
42
42
|
|
|
43
|
-
# Translate
|
|
44
|
-
npx @vercel/geistdocs translate
|
|
43
|
+
# Translate files matching a specific glob pattern
|
|
44
|
+
npx @vercel/geistdocs translate "content/docs/**/*.mdx"
|
|
45
45
|
|
|
46
46
|
# Use a custom config file
|
|
47
|
-
npx @vercel/geistdocs translate
|
|
47
|
+
npx @vercel/geistdocs translate "content/**/*.mdx" --config custom-config.tsx
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
| 选项 | 描述 |
|
|
51
51
|
| ----------- | ---------------------------------------------------------- |
|
|
52
|
-
| `--file` | 要翻译的单个 MDX 文件的路径 |
|
|
53
|
-
| `--pattern` | 匹配多个 MDX 文件的 glob 模式 |
|
|
54
52
|
| `--config` | 含有翻译配置的配置文件路径(默认:`geistdocs.tsx`) |
|
|
55
53
|
| `--url` | 自定义翻译 API URL |
|
|
56
54
|
|
|
@@ -82,7 +80,7 @@ export const translations = {
|
|
|
82
80
|
|
|
83
81
|
1. 在 `translations` 对象中添加带有语言代码的新键
|
|
84
82
|
2. 为诸如 `displayName` 和 `search` 之类的 UI 元素添加翻译
|
|
85
|
-
3. 运行 `npx @vercel/geistdocs translate
|
|
83
|
+
3. 运行 `npx @vercel/geistdocs translate "content/**/*.mdx"` 以生成翻译内容
|
|
86
84
|
|
|
87
85
|
语言选择器将自动包含您添加的新语言。
|
|
88
86
|
|
|
@@ -110,4 +108,4 @@ Fumadocs 会根据 URL 路径自动提供正确的文件。
|
|
|
110
108
|
|
|
111
109
|
语言由 URL 路径确定。不根据浏览器设置进行自动检测——用户必须使用语言选择器显式选择他们的语言。
|
|
112
110
|
|
|
113
|
-
这种方法为用户提供了完全的控制,并确保他们看到预期的语言。
|
|
111
|
+
这种方法为用户提供了完全的控制,并确保他们看到预期的语言。
|
|
@@ -11,7 +11,11 @@ related:
|
|
|
11
11
|
|
|
12
12
|
Geistdocs supports internationalization (i18n) out of the box using Fumadocs' language-aware routing. You can serve documentation in multiple languages with automatic translation via the Geistdocs CLI.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
<CopyPrompt text="Help me add a new language to this Geistdocs project. Update translations in geistdocs.tsx, run the Geistdocs translate command for content/docs, and explain how localized routes are generated.">
|
|
15
|
+
Help me add a new language to this Geistdocs project. Update `translations` in `geistdocs.tsx`, run the Geistdocs translate command for `content/docs`, and explain how localized routes are generated.
|
|
16
|
+
</CopyPrompt>
|
|
17
|
+
|
|
18
|
+
## How it works
|
|
15
19
|
|
|
16
20
|
The i18n system uses dynamic routing with a `[lang]` URL segment. The default language (English) doesn't show in URLs, while other languages get a prefix:
|
|
17
21
|
|
|
@@ -41,10 +45,10 @@ You can pass options directly to customize the translation behavior:
|
|
|
41
45
|
pnpm translate
|
|
42
46
|
|
|
43
47
|
# Translate files matching a specific glob pattern
|
|
44
|
-
pnpm translate
|
|
48
|
+
pnpm translate "content/docs/**/*.mdx"
|
|
45
49
|
|
|
46
50
|
# Use a custom config file
|
|
47
|
-
pnpm translate
|
|
51
|
+
pnpm translate "content/**/*.mdx" --config custom-config.tsx
|
|
48
52
|
|
|
49
53
|
# Use a custom translation API URL
|
|
50
54
|
pnpm translate --url "https://custom-api.example.com/translate"
|
|
@@ -52,10 +56,11 @@ pnpm translate --url "https://custom-api.example.com/translate"
|
|
|
52
56
|
|
|
53
57
|
| Option | Description |
|
|
54
58
|
| ----------- | -------------------------------------------------------- |
|
|
55
|
-
| `--pattern` | Glob pattern to match MDX files (default: `content/docs/**/*.mdx`) |
|
|
56
59
|
| `--config` | Path to config file with translations (default: `geistdocs.tsx`) |
|
|
57
60
|
| `--url` | Custom translation API URL (can also use `GEISTDOCS_TRANSLATE_URL` env var) |
|
|
58
61
|
|
|
62
|
+
Pass the glob pattern as the command argument. If you omit it, Geistdocs uses `content/docs/**/*.mdx`.
|
|
63
|
+
|
|
59
64
|
The CLI automatically excludes files that already have a locale suffix (e.g., `getting-started.cn.mdx`) to avoid translating already-translated content.
|
|
60
65
|
|
|
61
66
|
### Batch Processing
|
|
@@ -86,7 +91,7 @@ To add a new language:
|
|
|
86
91
|
|
|
87
92
|
1. Add a new key to the `translations` object with the language code
|
|
88
93
|
2. Add translations for UI elements like `displayName` and `search`
|
|
89
|
-
3. Run `pnpm translate
|
|
94
|
+
3. Run `pnpm translate "content/**/*.mdx"` to generate translated content
|
|
90
95
|
|
|
91
96
|
The language selector will automatically include your new language.
|
|
92
97
|
|
|
@@ -6,6 +6,7 @@ summary: 遵循 llms.txt 标准,将所有文档以纯 Markdown 文本形式返
|
|
|
6
6
|
related:
|
|
7
7
|
- /docs/md
|
|
8
8
|
- /docs/ask-ai
|
|
9
|
+
- /docs/proxy
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
Geistdocs 实现了 [llms.txt 标准](https://llmstxt.org/) —— 一种约定,将您所有的文档内容提供为单个、AI 可读的文本文件。这使得语言模型可以一次性轻松理解您的完整文档。
|
|
@@ -29,10 +30,31 @@ https://yourdomain.com/llms.txt
|
|
|
29
30
|
1. 从您的文档中获取所有页面
|
|
30
31
|
2. 处理每个页面以提取干净的 Markdown
|
|
31
32
|
3. 将所有内容合并为单个文本文件
|
|
32
|
-
4. 以 `text/
|
|
33
|
+
4. 以 `text/markdown` 返回
|
|
33
34
|
|
|
34
35
|
页面之间使用双换行符 (`\n\n`) 连接以便清晰分隔。
|
|
35
36
|
|
|
37
|
+
## 配置 sources
|
|
38
|
+
|
|
39
|
+
生成的项目使用一个文档 source:
|
|
40
|
+
|
|
41
|
+
```ts title="app/[lang]/llms.txt/route.ts"
|
|
42
|
+
import { createLlmsRoute } from "@vercel/geistdocs/routes/llms";
|
|
43
|
+
import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
44
|
+
|
|
45
|
+
export const { GET, revalidate } = createLlmsRoute({
|
|
46
|
+
source: geistdocsSource,
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
有多个内容区或版本的站点可以传入 `sources`:
|
|
51
|
+
|
|
52
|
+
```ts title="app/[lang]/llms.txt/route.ts"
|
|
53
|
+
export const { GET, revalidate } = createLlmsRoute({
|
|
54
|
+
sources: [docsSource, cookbookSource],
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
36
58
|
## 使用场景
|
|
37
59
|
|
|
38
60
|
此功能可用于:
|
|
@@ -47,4 +69,4 @@ https://yourdomain.com/llms.txt
|
|
|
47
69
|
|
|
48
70
|
llms.txt 标准是一种简单的约定,使文档对 AI 工具更易访问。它在精神上类似于 `robots.txt`,但设计目标是面向语言模型而非搜索爬虫。
|
|
49
71
|
|
|
50
|
-
在 [llmstxt.org](https://llmstxt.org/) 了解更多。
|
|
72
|
+
在 [llmstxt.org](https://llmstxt.org/) 了解更多。
|
|
@@ -4,15 +4,21 @@ 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
|
|
10
|
+
- /docs/proxy
|
|
9
11
|
---
|
|
10
12
|
|
|
11
|
-
Geistdocs implements the [llms.txt standard](https://llmstxt.org/)
|
|
13
|
+
Geistdocs implements the [llms.txt standard](https://llmstxt.org/), a convention for exposing documentation as one AI-readable text file. Language models and coding agents can use `/llms.txt` to retrieve broad documentation context.
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
<CopyPrompt text="Help me verify this Geistdocs site's AI-readable docs. Check /llms.txt and a few .mdx page URLs, then explain whether an AI assistant can retrieve the full documentation context.">
|
|
16
|
+
Help me verify this Geistdocs site's AI-readable docs. Check `/llms.txt` and a few `.mdx` page URLs, then explain whether an AI assistant can retrieve the full documentation context.
|
|
17
|
+
</CopyPrompt>
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
## What it is
|
|
20
|
+
|
|
21
|
+
The `/llms.txt` endpoint returns all configured documentation pages as Markdown in a single response. Each page is separated by blank lines so AI tools can parse the complete documentation set.
|
|
16
22
|
|
|
17
23
|
### Access
|
|
18
24
|
|
|
@@ -20,20 +26,20 @@ The `/llms.txt` endpoint returns all your documentation pages as plain Markdown
|
|
|
20
26
|
https://yourdomain.com/llms.txt
|
|
21
27
|
```
|
|
22
28
|
|
|
23
|
-
Returns all documentation pages concatenated together as
|
|
29
|
+
Returns all documentation pages concatenated together as Markdown.
|
|
24
30
|
|
|
25
|
-
## How
|
|
31
|
+
## How it works
|
|
26
32
|
|
|
27
|
-
The
|
|
33
|
+
The package route helper:
|
|
28
34
|
|
|
29
|
-
1. Fetches
|
|
30
|
-
2. Processes each page to extract clean Markdown
|
|
31
|
-
3. Combines
|
|
32
|
-
4. Returns
|
|
35
|
+
1. Fetches pages from one or more source bundles.
|
|
36
|
+
2. Processes each page to extract clean Markdown.
|
|
37
|
+
3. Combines the pages into a single response.
|
|
38
|
+
4. Returns the response as `text/markdown`.
|
|
33
39
|
|
|
34
40
|
Pages are joined with double newlines (`\n\n`) for clear separation.
|
|
35
41
|
|
|
36
|
-
## Use
|
|
42
|
+
## Use cases
|
|
37
43
|
|
|
38
44
|
This feature enables:
|
|
39
45
|
|
|
@@ -43,7 +49,37 @@ This feature enables:
|
|
|
43
49
|
- **Bulk Processing** - Process all documentation at once
|
|
44
50
|
- **LLM Context** - Give language models complete documentation context
|
|
45
51
|
|
|
46
|
-
##
|
|
52
|
+
## Configure sources
|
|
53
|
+
|
|
54
|
+
Generated projects use one documentation source:
|
|
55
|
+
|
|
56
|
+
```ts title="app/[lang]/llms.txt/route.ts"
|
|
57
|
+
import { createLlmsRoute } from "@vercel/geistdocs/routes/llms";
|
|
58
|
+
import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
59
|
+
|
|
60
|
+
export const { GET, revalidate } = createLlmsRoute({
|
|
61
|
+
source: geistdocsSource,
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Sites with multiple content sections or versions can pass `sources`:
|
|
66
|
+
|
|
67
|
+
```ts title="app/[lang]/llms.txt/route.ts"
|
|
68
|
+
export const { GET, revalidate } = createLlmsRoute({
|
|
69
|
+
sources: [docsSource, cookbookSource],
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Use `filterPage` to exclude pages from `/llms.txt`, such as internal or preview-only docs:
|
|
74
|
+
|
|
75
|
+
```ts title="app/[lang]/llms.txt/route.ts"
|
|
76
|
+
export const { GET, revalidate } = createLlmsRoute({
|
|
77
|
+
source: geistdocsSource,
|
|
78
|
+
filterPage: (page) => !page.url.includes("/internal"),
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## The llms.txt standard
|
|
47
83
|
|
|
48
84
|
The llms.txt standard is a simple convention that makes documentation more accessible to AI tools. It's similar in spirit to `robots.txt` but designed for language models instead of search crawlers.
|
|
49
85
|
|