@vercel/geistdocs 1.2.2 → 1.2.3-canary.1d733b2
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/dist/assets/icons/index.js +10 -0
- package/dist/assets/logos/index.d.ts +15 -0
- package/dist/assets/logos/index.d.ts.map +1 -0
- package/dist/assets/logos/index.js +15 -0
- 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 +3 -0
- package/dist/components/callout.d.ts +12 -0
- package/dist/components/callout.d.ts.map +1 -0
- package/dist/components/callout.js +7 -0
- package/dist/components/code-block-tabs.d.ts +7 -0
- package/dist/components/code-block-tabs.d.ts.map +1 -0
- package/dist/components/code-block-tabs.js +7 -0
- package/dist/components/code-block.d.ts +14 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +45 -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/mermaid.d.ts +4 -0
- package/dist/components/mermaid.d.ts.map +1 -0
- package/dist/components/mermaid.js +44 -0
- package/dist/components/theme-aware-image.d.ts +12 -0
- package/dist/components/theme-aware-image.d.ts.map +1 -0
- package/dist/components/theme-aware-image.js +8 -0
- package/dist/components/video.d.ts +6 -0
- package/dist/components/video.d.ts.map +1 -0
- package/dist/components/video.js +3 -0
- package/dist/config.d.ts +117 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1 -0
- package/dist/controls.d.ts +15 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/controls.js +52 -0
- 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/context.d.ts +19 -0
- package/dist/internal/chat/context.d.ts.map +1 -0
- package/dist/internal/chat/context.js +36 -0
- package/dist/internal/chat/conversation.d.ts +10 -0
- package/dist/internal/chat/conversation.d.ts.map +1 -0
- package/dist/internal/chat/conversation.js +16 -0
- package/dist/internal/chat/copy-chat.d.ts +5 -0
- package/dist/internal/chat/copy-chat.d.ts.map +1 -0
- package/dist/internal/chat/copy-chat.js +35 -0
- package/dist/internal/chat/db.d.ts +13 -0
- package/dist/internal/chat/db.d.ts.map +1 -0
- package/dist/internal/chat/db.js +19 -0
- package/dist/internal/chat/message-metadata.d.ts +8 -0
- package/dist/internal/chat/message-metadata.d.ts.map +1 -0
- package/dist/internal/chat/message-metadata.js +29 -0
- package/dist/internal/chat/message.d.ts +11 -0
- package/dist/internal/chat/message.d.ts.map +1 -0
- package/dist/internal/chat/message.js +11 -0
- package/dist/internal/chat/prompt-input.d.ts +13 -0
- package/dist/internal/chat/prompt-input.d.ts.map +1 -0
- package/dist/internal/chat/prompt-input.js +39 -0
- package/dist/internal/chat/shell.d.ts +2 -0
- package/dist/internal/chat/shell.d.ts.map +1 -0
- package/dist/internal/chat/shell.js +194 -0
- package/dist/internal/chat/shimmer.d.ts +11 -0
- package/dist/internal/chat/shimmer.d.ts.map +1 -0
- package/dist/internal/chat/shimmer.js +18 -0
- package/dist/internal/chat/sources.d.ts +13 -0
- package/dist/internal/chat/sources.d.ts.map +1 -0
- package/dist/internal/chat/sources.js +9 -0
- package/dist/internal/chat/suggestion.d.ts +11 -0
- package/dist/internal/chat/suggestion.d.ts.map +1 -0
- package/dist/internal/chat/suggestion.js +12 -0
- package/dist/internal/cn.d.ts +3 -0
- package/dist/internal/cn.d.ts.map +1 -0
- package/dist/internal/cn.js +3 -0
- 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/feedback-action.d.ts +14 -0
- package/dist/internal/feedback-action.d.ts.map +1 -0
- package/dist/internal/feedback-action.js +34 -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/i18n.d.ts +6 -0
- package/dist/internal/i18n.d.ts.map +1 -0
- package/dist/internal/i18n.js +18 -0
- package/dist/internal/languages.d.ts +7 -0
- package/dist/internal/languages.d.ts.map +1 -0
- package/dist/internal/languages.js +18 -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/not-implemented.d.ts +2 -0
- package/dist/internal/not-implemented.d.ts.map +1 -0
- package/dist/internal/not-implemented.js +4 -0
- package/dist/internal/page-actions-client.d.ts +13 -0
- package/dist/internal/page-actions-client.d.ts.map +1 -0
- package/dist/internal/page-actions-client.js +171 -0
- package/dist/internal/page-actions.d.ts +18 -0
- package/dist/internal/page-actions.d.ts.map +1 -0
- package/dist/internal/page-actions.js +4 -0
- 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/search.d.ts +5 -0
- package/dist/internal/search.d.ts.map +1 -0
- package/dist/internal/search.js +14 -0
- package/dist/internal/sidebar.d.ts +9 -0
- package/dist/internal/sidebar.d.ts.map +1 -0
- package/dist/internal/sidebar.js +38 -0
- 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.d.ts +13 -0
- package/dist/internal/ui/button-group.d.ts.map +1 -0
- package/dist/internal/ui/button-group.js +26 -0
- package/dist/internal/ui/button.d.ts +12 -0
- package/dist/internal/ui/button.d.ts.map +1 -0
- package/dist/internal/ui/button.js +33 -0
- package/dist/internal/ui/card.d.ts +6 -0
- package/dist/internal/ui/card.d.ts.map +1 -0
- package/dist/internal/ui/card.js +14 -0
- package/dist/internal/ui/collapsible.d.ts +6 -0
- package/dist/internal/ui/collapsible.d.ts.map +1 -0
- package/dist/internal/ui/collapsible.js +12 -0
- package/dist/internal/ui/drawer.d.ts +6 -0
- package/dist/internal/ui/drawer.d.ts.map +1 -0
- package/dist/internal/ui/drawer.js +13 -0
- package/dist/internal/ui/dropdown-menu.d.ts +22 -0
- package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/internal/ui/dropdown-menu.js +41 -0
- package/dist/internal/ui/input-group.d.ts +15 -0
- package/dist/internal/ui/input-group.d.ts.map +1 -0
- package/dist/internal/ui/input-group.js +44 -0
- package/dist/internal/ui/input.d.ts +3 -0
- package/dist/internal/ui/input.d.ts.map +1 -0
- package/dist/internal/ui/input.js +5 -0
- package/dist/internal/ui/kbd.d.ts +4 -0
- package/dist/internal/ui/kbd.d.ts.map +1 -0
- package/dist/internal/ui/kbd.js +8 -0
- 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.d.ts +6 -0
- package/dist/internal/ui/popover.d.ts.map +1 -0
- package/dist/internal/ui/popover.js +13 -0
- package/dist/internal/ui/scroll-area.d.ts +5 -0
- package/dist/internal/ui/scroll-area.d.ts.map +1 -0
- package/dist/internal/ui/scroll-area.js +12 -0
- package/dist/internal/ui/separator.d.ts +4 -0
- package/dist/internal/ui/separator.d.ts.map +1 -0
- package/dist/internal/ui/separator.js +7 -0
- package/dist/internal/ui/sheet.d.ts +10 -0
- package/dist/internal/ui/sheet.d.ts.map +1 -0
- package/dist/internal/ui/sheet.js +24 -0
- package/dist/internal/ui/sonner.d.ts +3 -0
- package/dist/internal/ui/sonner.d.ts.map +1 -0
- package/dist/internal/ui/sonner.js +20 -0
- package/dist/internal/ui/spinner.d.ts +3 -0
- package/dist/internal/ui/spinner.d.ts.map +1 -0
- package/dist/internal/ui/spinner.js +6 -0
- package/dist/internal/ui/textarea.d.ts +3 -0
- package/dist/internal/ui/textarea.d.ts.map +1 -0
- package/dist/internal/ui/textarea.js +5 -0
- package/dist/internal/ui/tooltip.d.ts +7 -0
- package/dist/internal/ui/tooltip.d.ts.map +1 -0
- package/dist/internal/ui/tooltip.js +16 -0
- package/dist/internal/use-mobile.d.ts +2 -0
- package/dist/internal/use-mobile.d.ts.map +1 -0
- package/dist/internal/use-mobile.js +16 -0
- package/dist/layout.d.ts +14 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +31 -0
- package/dist/mdx.d.ts +67 -0
- package/dist/mdx.d.ts.map +1 -0
- package/dist/mdx.js +35 -0
- 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 +83 -0
- package/dist/pages/docs.d.ts.map +1 -0
- package/dist/pages/docs.js +98 -0
- package/dist/proxy.d.ts +37 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +189 -0
- 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 +14 -0
- package/dist/routes/chat.d.ts.map +1 -0
- package/dist/routes/chat.js +251 -0
- package/dist/routes/llms.d.ts +52 -0
- package/dist/routes/llms.d.ts.map +1 -0
- package/dist/routes/llms.js +110 -0
- package/dist/routes/search.d.ts +13 -0
- package/dist/routes/search.d.ts.map +1 -0
- package/dist/routes/search.js +81 -0
- package/dist/routes/sitemap.d.ts +47 -0
- package/dist/routes/sitemap.d.ts.map +1 -0
- package/dist/routes/sitemap.js +176 -0
- 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 +181 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +142 -0
- package/dist/versions.d.ts +45 -0
- package/dist/versions.d.ts.map +1 -0
- package/dist/versions.js +79 -0
- package/package.json +186 -9
- package/source-config.js +174 -0
- package/styles.css +556 -0
- package/template/AGENTS.md +82 -0
- package/template/_gitignore +29 -0
- package/template/app/[lang]/(home)/components/centered-section.tsx +24 -0
- package/template/app/[lang]/(home)/components/cta.tsx +19 -0
- package/template/app/[lang]/(home)/components/hero.tsx +27 -0
- package/template/app/[lang]/(home)/components/one-two-section.tsx +23 -0
- package/template/app/[lang]/(home)/components/templates.tsx +48 -0
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
- package/template/app/[lang]/(home)/layout.tsx +15 -0
- package/template/app/[lang]/(home)/page.tsx +126 -0
- package/template/app/[lang]/agents.md/route.ts +6 -0
- package/template/app/[lang]/docs/[[...slug]]/page.tsx +22 -0
- package/template/app/[lang]/docs/layout.tsx +14 -0
- package/template/app/[lang]/layout.tsx +29 -0
- package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
- package/template/app/[lang]/llms.txt/route.ts +6 -0
- package/template/app/[lang]/og/[...slug]/background.png +0 -0
- package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
- package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
- package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
- package/template/app/[lang]/rss.xml/route.ts +52 -0
- package/template/app/[lang]/sitemap.md/route.ts +9 -0
- package/template/app/api/chat/route.ts +8 -0
- package/template/app/api/search/route.ts +5 -0
- package/template/app/favicon.ico +0 -0
- package/template/app/global.css +2 -0
- package/template/app/robots.ts +14 -0
- package/template/app/sitemap.ts +36 -0
- package/template/app/styles/geistdocs.css +595 -0
- package/template/components/geistdocs/docs-layout.tsx +20 -0
- package/template/components/geistdocs/mdx-components.tsx +5 -0
- package/template/components/geistdocs/provider.tsx +31 -0
- package/template/components/ui/badge.tsx +46 -0
- package/template/components/ui/button.tsx +60 -0
- package/template/components/ui/command-prompt.tsx +488 -0
- package/template/components.json +22 -0
- package/template/content/docs/agent-readiness.mdx +103 -0
- package/template/content/docs/ask-ai.cn.mdx +85 -0
- package/template/content/docs/ask-ai.mdx +89 -0
- package/template/content/docs/configuration.cn.mdx +155 -0
- package/template/content/docs/configuration.mdx +275 -0
- package/template/content/docs/deployment.cn.mdx +34 -0
- package/template/content/docs/deployment.mdx +40 -0
- package/template/content/docs/edit-on-github.cn.mdx +47 -0
- package/template/content/docs/edit-on-github.mdx +51 -0
- package/template/content/docs/env.cn.mdx +25 -0
- package/template/content/docs/env.mdx +29 -0
- package/template/content/docs/feedback.cn.mdx +85 -0
- package/template/content/docs/feedback.mdx +89 -0
- package/template/content/docs/getting-started.cn.mdx +86 -0
- package/template/content/docs/getting-started.mdx +108 -0
- package/template/content/docs/index.cn.mdx +57 -0
- package/template/content/docs/index.mdx +95 -0
- package/template/content/docs/internationalization.cn.mdx +111 -0
- package/template/content/docs/internationalization.mdx +122 -0
- package/template/content/docs/llms-txt.cn.mdx +72 -0
- package/template/content/docs/llms-txt.mdx +86 -0
- package/template/content/docs/md.cn.mdx +65 -0
- package/template/content/docs/md.mdx +82 -0
- package/template/content/docs/meta.json +25 -0
- package/template/content/docs/migration.mdx +321 -0
- package/template/content/docs/open-in-chat.cn.mdx +78 -0
- package/template/content/docs/open-in-chat.mdx +80 -0
- package/template/content/docs/provider.cn.mdx +70 -0
- package/template/content/docs/provider.mdx +74 -0
- package/template/content/docs/proxy.cn.mdx +96 -0
- package/template/content/docs/proxy.mdx +178 -0
- package/template/content/docs/rss.cn.mdx +104 -0
- package/template/content/docs/rss.mdx +108 -0
- package/template/content/docs/syntax.cn.mdx +416 -0
- package/template/content/docs/syntax.mdx +411 -0
- package/template/content/docs/theme-aware-image.mdx +57 -0
- package/template/content/docs/versioned-docs.cn.mdx +117 -0
- package/template/content/docs/versioned-docs.mdx +228 -0
- package/template/geistdocs.tsx +77 -0
- package/template/lib/geistdocs/config.tsx +30 -0
- package/template/lib/geistdocs/fonts.ts +18 -0
- package/template/lib/geistdocs/i18n.ts +13 -0
- package/template/lib/geistdocs/md-tracking.ts +56 -0
- package/template/lib/geistdocs/source.ts +12 -0
- package/template/lib/utils.ts +6 -0
- package/template/next.config.ts +22 -0
- package/template/package.json +63 -0
- package/template/postcss.config.mjs +5 -0
- package/template/proxy.ts +17 -0
- package/template/source.config.ts +23 -0
- package/template/tsconfig.json +37 -0
- package/dist/index.js +0 -2
- /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 在 GitHub 上编辑
|
|
3
|
+
description: 允许读者通过在 GitHub 上编辑文档页面直接贡献更改
|
|
4
|
+
type: integration
|
|
5
|
+
summary: 每个文档页面上的直接链接,让读者通过 GitHub 拉取请求提出更改。
|
|
6
|
+
related:
|
|
7
|
+
- /docs/configuration
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
“在 GitHub 上编辑” 功能为读者提供了一个直接的链接,用于建议对您的文档进行更改。该链接出现在每个文档页面的目录侧栏中,方便用户提交修复、改进或更新。
|
|
11
|
+
|
|
12
|
+
## 工作原理
|
|
13
|
+
|
|
14
|
+
当用户点击 **“在 GitHub 上编辑此页”** 链接时,会直接跳转到您 GitHub 仓库中的源文件。在那里,他们可以:
|
|
15
|
+
|
|
16
|
+
1. Fork 仓库(如果尚未 Fork)
|
|
17
|
+
2. 在 GitHub 网页编辑器中进行编辑
|
|
18
|
+
3. 提交包含其更改的 pull request
|
|
19
|
+
|
|
20
|
+
此工作流程利用了 GitHub 内置的编辑功能,使技术用户和非技术用户都能方便地进行贡献。
|
|
21
|
+
|
|
22
|
+
## 配置
|
|
23
|
+
|
|
24
|
+
"在 GitHub 上编辑" 链接基于 `geistdocs.tsx` 配置文件中的 `github` 对象自动生成。设置 `owner` 和 `repo` 属性以启用此功能:
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
export const github = {
|
|
28
|
+
owner: "your-username",
|
|
29
|
+
repo: "your-repo-name",
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
如果这些值未设置,该链接将不会出现在您的文档页面上。
|
|
34
|
+
|
|
35
|
+
### 生成的 URL 格式
|
|
36
|
+
|
|
37
|
+
链接遵循以下模式:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
https://github.com/{owner}/{repo}/edit/main/content/docs/{file-path}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
例如,如果您的页面位于 `content/docs/getting-started.mdx`,则生成的链接为:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
https://github.com/your-username/your-repo-name/edit/main/content/docs/getting-started.mdx
|
|
47
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Edit on GitHub
|
|
3
|
+
description: Allow readers to contribute directly by editing documentation pages on GitHub
|
|
4
|
+
type: integration
|
|
5
|
+
summary: A direct link on every documentation page that lets readers propose changes through GitHub pull requests.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/configuration
|
|
8
|
+
---
|
|
9
|
+
|
|
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
|
+
|
|
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
|
|
17
|
+
|
|
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:
|
|
19
|
+
|
|
20
|
+
1. Fork the repository (if they haven't already)
|
|
21
|
+
2. Make their edits in the GitHub web editor
|
|
22
|
+
3. Submit a pull request with their changes
|
|
23
|
+
|
|
24
|
+
This workflow leverages GitHub's built-in editing capabilities, making it straightforward for both technical and non-technical users to contribute.
|
|
25
|
+
|
|
26
|
+
## Configuration
|
|
27
|
+
|
|
28
|
+
The Edit on GitHub link is automatically generated based on the `github` object in your `geistdocs.tsx` configuration file. Set the `owner` and `repo` properties to enable this feature:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
export const github = {
|
|
32
|
+
owner: "your-username",
|
|
33
|
+
repo: "your-repo-name",
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If these values are not set, the link will not appear on your documentation pages.
|
|
38
|
+
|
|
39
|
+
### Generated URL Format
|
|
40
|
+
|
|
41
|
+
The link follows this pattern:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
https://github.com/{owner}/{repo}/edit/main/content/docs/{file-path}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For example, if your page is located at `content/docs/getting-started.mdx`, the generated link would be:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
https://github.com/your-username/your-repo-name/edit/main/content/docs/getting-started.mdx
|
|
51
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 环境变量
|
|
3
|
+
description: 了解 Geistdocs 中使用的环境变量
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Geistdocs 所需的 AI 聊天和生产 URL 配置环境变量。
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
related:
|
|
9
|
+
- /docs/configuration
|
|
10
|
+
- /docs/deployment
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Geistdocs 的某些功能需要设置特定的环境变量。
|
|
14
|
+
|
|
15
|
+
## `AI_GATEWAY_API_KEY`
|
|
16
|
+
|
|
17
|
+
AI 网关的 API 密钥。用于驱动 AI 聊天功能。
|
|
18
|
+
|
|
19
|
+
<Callout>部署到 Vercel 时会自动设置此项。</Callout>
|
|
20
|
+
|
|
21
|
+
## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`
|
|
22
|
+
|
|
23
|
+
Geistdocs 站点的生产环境 URL。部署到 Vercel 时会自动设置此项。
|
|
24
|
+
|
|
25
|
+
应采用 `localhost:3000` 的格式(即不带协议前缀)。这是 Vercel 在将项目部署时设置该环境变量的方式。
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Environment Variables
|
|
3
|
+
description: Learn about the environment variables used in Geistdocs
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Environment variables required by Geistdocs for AI chat and production URL configuration.
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
related:
|
|
9
|
+
- /docs/configuration
|
|
10
|
+
- /docs/deployment
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Geistdocs has functionality that requires specific environment variables to be set.
|
|
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.
|
|
17
|
+
</CopyPrompt>
|
|
18
|
+
|
|
19
|
+
## `AI_GATEWAY_API_KEY`
|
|
20
|
+
|
|
21
|
+
The API key for the AI gateway. This is used to power the AI chat functionality.
|
|
22
|
+
|
|
23
|
+
<Callout>This is automatically set when deploying to Vercel.</Callout>
|
|
24
|
+
|
|
25
|
+
## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`
|
|
26
|
+
|
|
27
|
+
The production URL of the Geistdocs site. This is automatically set when deploying to Vercel.
|
|
28
|
+
|
|
29
|
+
It should be in the format `localhost:3000` (i.e. without the protocol prefix). This is how Vercel sets the environment variable when deploying to a project.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 反馈
|
|
3
|
+
description: 使用基于情感的交互式小部件收集用户反馈并创建 GitHub Issues
|
|
4
|
+
type: integration
|
|
5
|
+
summary: 收集用户情感反馈并自动创建结构化 GitHub Issues 的交互式反馈小部件。
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
related:
|
|
9
|
+
- /docs/provider
|
|
10
|
+
- /docs/configuration
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
反馈功能允许阅读者通过交互式小部件分享他们对文档页面的看法。反馈会自动以 issues 的形式发布到集中管理的 GitHub 仓库,便于跟踪、标记和响应用户输入。
|
|
14
|
+
|
|
15
|
+
## 工作原理
|
|
16
|
+
|
|
17
|
+
反馈小部件会显示在每个文档页面的目录侧边栏中。当用户点击“提供反馈”时,他们可以:
|
|
18
|
+
|
|
19
|
+
1. 撰写他们的反馈信息
|
|
20
|
+
2. 选择表示其体验的情感(🤩、🙂、😕、😭)
|
|
21
|
+
3. 可选地提供他们的姓名和电子邮件
|
|
22
|
+
4. 提交他们的反馈
|
|
23
|
+
|
|
24
|
+
### 反馈工作流
|
|
25
|
+
|
|
26
|
+
当反馈被提交时:
|
|
27
|
+
|
|
28
|
+
1. 反馈会根据 JSON 模式进行验证
|
|
29
|
+
2. 在配置的反馈仓库中创建一个新的 GitHub Issue
|
|
30
|
+
3. 根据情感、主题和其他元数据自动应用标签
|
|
31
|
+
4. 用户详情和元数据被格式化为结构化的 markdown 表格
|
|
32
|
+
|
|
33
|
+
每条反馈都会创建一个单独的 issue,便于单独跟踪和解决。
|
|
34
|
+
|
|
35
|
+
## 反馈架构
|
|
36
|
+
|
|
37
|
+
API 接受以下字段:
|
|
38
|
+
|
|
39
|
+
| Field | Type | Required | Max Length | Description |
|
|
40
|
+
| --------- | ------ | -------- | ---------- | ------------------------------------- |
|
|
41
|
+
| `note` | string | 是 | 16,384 | 反馈消息 |
|
|
42
|
+
| `url` | string | 否 | 1,024 | 提交反馈的页面 URL |
|
|
43
|
+
| `emotion` | string | 否 | 1 | 表示用户情感的表情符号 |
|
|
44
|
+
| `topic` | string | 否 | 1,024 | 反馈主题/类别 |
|
|
45
|
+
| `name` | string | 否 | 1,024 | 用户姓名 |
|
|
46
|
+
| `email` | string | 否 | 1,024 | 用户电子邮件 |
|
|
47
|
+
| `ua` | string | 否 | 256 | 用户代理字符串 |
|
|
48
|
+
| `label` | string | 否 | 64 | 用于 issue 的自定义标签 |
|
|
49
|
+
| `thumbs` | string | 否 | 4 | 赞成/反对 指示器 |
|
|
50
|
+
| `reason` | string | 否 | 10 | 不赞成的原因 |
|
|
51
|
+
| `plan` | string | 否 | 10 | 用户的计划类型 |
|
|
52
|
+
|
|
53
|
+
附加字段会作为元数据被捕获并显示在 issue 正文中。
|
|
54
|
+
|
|
55
|
+
## 功能
|
|
56
|
+
|
|
57
|
+
### 自动标记
|
|
58
|
+
|
|
59
|
+
Issues 会根据以下内容自动添加标签:
|
|
60
|
+
|
|
61
|
+
- **情感**: `emotion-amazed`, `emotion-happy`, `emotion-sad`, `emotion-cry`
|
|
62
|
+
- **主题**: `topic-{topic-name}`
|
|
63
|
+
- **计划**: `{plan}-plan`
|
|
64
|
+
- **赞/踩**: `thumbs-up`, `thumbs-down`
|
|
65
|
+
- **原因**: `reason-{reason}`(用于不赞成)
|
|
66
|
+
- **自定义标签**: 通过 `label` 字段传入的任何标签
|
|
67
|
+
- **默认标签**: `unresolved`, `vercel-site`
|
|
68
|
+
|
|
69
|
+
### 结构化的 Issue 正文
|
|
70
|
+
|
|
71
|
+
每个 issue 包含格式化的 markdown 正文,包含:
|
|
72
|
+
|
|
73
|
+
- 反馈内容
|
|
74
|
+
- 提交反馈的页面 URL
|
|
75
|
+
- 用户详情表(电子邮件、上下文、IP、用户代理)
|
|
76
|
+
- 用于任何附加字段的元数据表
|
|
77
|
+
|
|
78
|
+
### 元数据支持
|
|
79
|
+
|
|
80
|
+
在请求正文中传递任何附加字段,它们将被作为元数据捕获并显示在 issue 的单独表格中。这允许你包含:
|
|
81
|
+
|
|
82
|
+
- 用户 ID
|
|
83
|
+
- 功能开关
|
|
84
|
+
- 实验分组
|
|
85
|
+
- 自定义跟踪数据
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Feedback
|
|
3
|
+
description: Collect user feedback with an interactive emotion-based widget that creates GitHub Issues
|
|
4
|
+
type: integration
|
|
5
|
+
summary: An interactive feedback widget that collects user sentiment and creates structured GitHub Issues automatically.
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
related:
|
|
9
|
+
- /docs/provider
|
|
10
|
+
- /docs/configuration
|
|
11
|
+
---
|
|
12
|
+
|
|
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
|
+
|
|
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
|
|
20
|
+
|
|
21
|
+
The feedback widget appears in the table of contents sidebar on every documentation page. When users click "Give feedback", they can:
|
|
22
|
+
|
|
23
|
+
1. Write their feedback message
|
|
24
|
+
2. Select an emotion that represents their experience (🤩, 🙂, 😕, 😭)
|
|
25
|
+
3. Optionally provide their name and email
|
|
26
|
+
4. Submit their feedback
|
|
27
|
+
|
|
28
|
+
### Feedback Workflow
|
|
29
|
+
|
|
30
|
+
When feedback is submitted:
|
|
31
|
+
|
|
32
|
+
1. The feedback is validated against a JSON schema
|
|
33
|
+
2. A new GitHub Issue is created in the configured feedback repository
|
|
34
|
+
3. Labels are automatically applied based on the emotion, topic, and other metadata
|
|
35
|
+
4. User details and metadata are formatted into a structured markdown table
|
|
36
|
+
|
|
37
|
+
Each piece of feedback creates a separate issue, allowing for individual tracking and resolution.
|
|
38
|
+
|
|
39
|
+
## Feedback Schema
|
|
40
|
+
|
|
41
|
+
The API accepts the following fields:
|
|
42
|
+
|
|
43
|
+
| Field | Type | Required | Max Length | Description |
|
|
44
|
+
| --------- | ------ | -------- | ---------- | ------------------------------------- |
|
|
45
|
+
| `note` | string | Yes | 16,384 | The feedback message |
|
|
46
|
+
| `url` | string | No | 1,024 | Page URL where feedback was submitted |
|
|
47
|
+
| `emotion` | string | No | 1 | Emoji representing user sentiment |
|
|
48
|
+
| `topic` | string | No | 1,024 | Feedback topic/category |
|
|
49
|
+
| `name` | string | No | 1,024 | User's name |
|
|
50
|
+
| `email` | string | No | 1,024 | User's email |
|
|
51
|
+
| `ua` | string | No | 256 | User agent string |
|
|
52
|
+
| `label` | string | No | 64 | Custom label for the issue |
|
|
53
|
+
| `thumbs` | string | No | 4 | Thumbs up/down indicator |
|
|
54
|
+
| `reason` | string | No | 10 | Reason for thumbs down |
|
|
55
|
+
| `plan` | string | No | 10 | User's plan type |
|
|
56
|
+
|
|
57
|
+
Additional fields are captured as metadata and displayed in the issue body.
|
|
58
|
+
|
|
59
|
+
## Features
|
|
60
|
+
|
|
61
|
+
### Automatic Labeling
|
|
62
|
+
|
|
63
|
+
Issues are automatically labeled based on:
|
|
64
|
+
|
|
65
|
+
- **Emotion**: `emotion-amazed`, `emotion-happy`, `emotion-sad`, `emotion-cry`
|
|
66
|
+
- **Topic**: `topic-{topic-name}`
|
|
67
|
+
- **Plan**: `{plan}-plan`
|
|
68
|
+
- **Thumbs**: `thumbs-up`, `thumbs-down`
|
|
69
|
+
- **Reason**: `reason-{reason}` (for thumbs down)
|
|
70
|
+
- **Custom labels**: Any label passed via the `label` field
|
|
71
|
+
- **Default labels**: `unresolved`, `vercel-site`
|
|
72
|
+
|
|
73
|
+
### Structured Issue Body
|
|
74
|
+
|
|
75
|
+
Each issue includes a formatted markdown body with:
|
|
76
|
+
|
|
77
|
+
- The feedback note
|
|
78
|
+
- URL where feedback was submitted
|
|
79
|
+
- User details table (email, context, IP, user agent)
|
|
80
|
+
- Metadata table for any additional fields
|
|
81
|
+
|
|
82
|
+
### Metadata Support
|
|
83
|
+
|
|
84
|
+
Pass any additional fields in the request body, and they are captured as metadata and displayed in a separate table in the issue. This allows you to include:
|
|
85
|
+
|
|
86
|
+
- User IDs
|
|
87
|
+
- Feature flags
|
|
88
|
+
- Experiment groups
|
|
89
|
+
- Custom tracking data
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 入门指南
|
|
3
|
+
description: 关于 Geistdocs 的全面入门指南
|
|
4
|
+
type: guide
|
|
5
|
+
summary: 创建新的 Geistdocs 项目、配置环境变量并创建您的第一个文档页面。
|
|
6
|
+
related:
|
|
7
|
+
- /docs/env
|
|
8
|
+
- /docs/syntax
|
|
9
|
+
- /docs/deployment
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
本指南将引导您完成设置和自定义文档站点所需的所有内容。
|
|
13
|
+
|
|
14
|
+
## 先决条件
|
|
15
|
+
|
|
16
|
+
开始之前,请确保您具备:
|
|
17
|
+
|
|
18
|
+
- **Node.js 18+** 已在您的系统上安装
|
|
19
|
+
- **pnpm**(推荐)或您喜欢的 **npm** 包管理器
|
|
20
|
+
- **GitHub 账户** 用于仓库托管
|
|
21
|
+
- 对 **MDX**、**Next.js** 和 **React** 有基本了解
|
|
22
|
+
|
|
23
|
+
## 安装
|
|
24
|
+
|
|
25
|
+
### 1. 创建新项目
|
|
26
|
+
|
|
27
|
+
使用 Geistdocs CLI 创建新项目:
|
|
28
|
+
|
|
29
|
+
```bash title="Terminal"
|
|
30
|
+
npx @vercel/geistdocs init
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
这将把 Geistdocs 的 `template` 应用克隆到一个新目录。它会提示您输入项目名称,然后安装所有依赖并删除 Geistdocs 网站内容。
|
|
34
|
+
|
|
35
|
+
### 2. 配置环境变量
|
|
36
|
+
|
|
37
|
+
复制示例环境文件:
|
|
38
|
+
|
|
39
|
+
```bash title="Terminal"
|
|
40
|
+
cp .env.example .env.local
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
然后编辑 `.env.local` 文件中的环境变量。您可以在 [环境变量](/docs/env) 部分了解有关环境变量的更多信息。
|
|
44
|
+
|
|
45
|
+
### 3. 启动开发服务器
|
|
46
|
+
|
|
47
|
+
运行开发服务器:
|
|
48
|
+
|
|
49
|
+
```bash title="Terminal"
|
|
50
|
+
pnpm dev
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
在浏览器中打开 [http://localhost:3000](http://localhost:3000) 来查看您的文档站点。
|
|
54
|
+
|
|
55
|
+
### 4. 创建新页面
|
|
56
|
+
|
|
57
|
+
在 `content/docs/` 中创建一个新文件:
|
|
58
|
+
|
|
59
|
+
````mdx title="content/docs/my-first-page.mdx"
|
|
60
|
+
---
|
|
61
|
+
title: 我的第一页
|
|
62
|
+
description: 这是我的第一个文档页面
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
# My First Page
|
|
66
|
+
|
|
67
|
+
Welcome to my documentation! Find this page at `/docs/my-first-page`.
|
|
68
|
+
|
|
69
|
+
## Features
|
|
70
|
+
|
|
71
|
+
- Easy to write with Markdown
|
|
72
|
+
- Full React component support
|
|
73
|
+
- Automatic navigation generation
|
|
74
|
+
|
|
75
|
+
## Code Example
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
const greeting = (name: string): string => {
|
|
79
|
+
return `Hello, ${name}!`;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
console.log(greeting("World"));
|
|
83
|
+
```
|
|
84
|
+
````
|
|
85
|
+
|
|
86
|
+
在 [语法](/docs/syntax) 部分了解有关可用语法的更多信息。
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Getting Started
|
|
3
|
+
description: Create a Geistdocs project and start writing documentation
|
|
4
|
+
type: guide
|
|
5
|
+
summary: Create a Geistdocs project, run it locally, and edit your first documentation page.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/configuration
|
|
8
|
+
- /docs/migration
|
|
9
|
+
- /docs/syntax
|
|
10
|
+
- /docs/deployment
|
|
11
|
+
---
|
|
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.
|
|
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>
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
|
|
21
|
+
Before you begin, install:
|
|
22
|
+
|
|
23
|
+
- Node.js 18 or later
|
|
24
|
+
- pnpm, npm, or another package manager
|
|
25
|
+
- Git
|
|
26
|
+
|
|
27
|
+
## Create a project
|
|
28
|
+
|
|
29
|
+
Run the Geistdocs CLI from an empty parent folder:
|
|
30
|
+
|
|
31
|
+
```bash title="Terminal"
|
|
32
|
+
pnpm dlx @vercel/geistdocs init --name my-docs
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
You can also use npm:
|
|
36
|
+
|
|
37
|
+
```bash title="Terminal"
|
|
38
|
+
npx @vercel/geistdocs init --name my-docs
|
|
39
|
+
```
|
|
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.
|
|
42
|
+
|
|
43
|
+
## Start the development server
|
|
44
|
+
|
|
45
|
+
Open the generated project and start Next.js:
|
|
46
|
+
|
|
47
|
+
```bash title="Terminal"
|
|
48
|
+
cd my-docs
|
|
49
|
+
pnpm dev
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Open `http://localhost:3000` in your browser.
|
|
53
|
+
|
|
54
|
+
## Edit your first page
|
|
55
|
+
|
|
56
|
+
Docs live in `content/docs`. Edit the overview page:
|
|
57
|
+
|
|
58
|
+
```mdx title="content/docs/index.mdx"
|
|
59
|
+
---
|
|
60
|
+
title: Overview
|
|
61
|
+
description: Learn how to use my project.
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
My project helps developers build with clear documentation.
|
|
65
|
+
|
|
66
|
+
## Start here
|
|
67
|
+
|
|
68
|
+
Add the first workflow you want readers to complete.
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Add more pages by creating new `.mdx` files in `content/docs`.
|
|
72
|
+
|
|
73
|
+
## Update the sidebar
|
|
74
|
+
|
|
75
|
+
Use `content/docs/meta.json` to control page order and groups:
|
|
76
|
+
|
|
77
|
+
```json title="content/docs/meta.json"
|
|
78
|
+
{
|
|
79
|
+
"title": "Documentation",
|
|
80
|
+
"root": true,
|
|
81
|
+
"pages": ["index", "getting-started", "---Guides---", "deploy"]
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Configure the site
|
|
86
|
+
|
|
87
|
+
Use `geistdocs.tsx` to customize the site shell:
|
|
88
|
+
|
|
89
|
+
```tsx title="geistdocs.tsx"
|
|
90
|
+
export const title = "My Documentation";
|
|
91
|
+
|
|
92
|
+
export const nav = [
|
|
93
|
+
{ label: "Docs", href: "/docs" },
|
|
94
|
+
{ label: "GitHub", href: "https://github.com/my-org/my-repo" },
|
|
95
|
+
];
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Read [Configuration](/docs/configuration) for the full configuration surface.
|
|
99
|
+
|
|
100
|
+
## Update Geistdocs
|
|
101
|
+
|
|
102
|
+
For package-based projects, `geistdocs update` updates the `@vercel/geistdocs` package version. It does not overwrite your local content or adapter files.
|
|
103
|
+
|
|
104
|
+
```bash title="Terminal"
|
|
105
|
+
pnpm exec geistdocs update
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Review and test dependency changes before committing.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 概述
|
|
3
|
+
description: 了解 Geistdocs 如何将 CLI、运行时和模板打包为文档站点
|
|
4
|
+
type: overview
|
|
5
|
+
summary: Geistdocs 是一个打包的文档系统,用于创建带共享运行时功能的 Next.js 和 Fumadocs 站点。
|
|
6
|
+
related:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
- /docs/configuration
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Geistdocs 是一个基于 Next.js、Fumadocs 和 Vercel 文档模式的打包文档系统。使用它创建一个本地保存内容、运行时由包管理的文档站点。
|
|
12
|
+
|
|
13
|
+
## Geistdocs 的工作方式
|
|
14
|
+
|
|
15
|
+
Geistdocs 由三部分组成:
|
|
16
|
+
|
|
17
|
+
- `@vercel/geistdocs`:提供 CLI、运行时组件、route helpers、MDX 组件、页面操作和打包模板的 npm package。
|
|
18
|
+
- 本地 adapter 文件:生成项目中的文件,用于连接配置、内容 source、路由和 UI 自定义。
|
|
19
|
+
- 平台服务:`geistdocs.com` 上的可选翻译、反馈和 Markdown 请求追踪端点。
|
|
20
|
+
|
|
21
|
+
## 你会编辑的文件
|
|
22
|
+
|
|
23
|
+
大多数项目从这些文件开始:
|
|
24
|
+
|
|
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 协商前后添加站点特有的请求逻辑。
|
|
31
|
+
|
|
32
|
+
## 包负责的内容
|
|
33
|
+
|
|
34
|
+
包负责文档渲染、页面操作、搜索、Ask AI、Markdown 路由、`llms.txt` 和可复用 MDX 组件等共享行为。更新 `@vercel/geistdocs` 可以获得包级别修复和功能,而不会覆盖你拥有的 adapter 文件。
|
|
35
|
+
|
|
36
|
+
高级项目可以使用包 API 配置版本化文档、多个内容 source、自定义页面 metadata 和自定义 proxy hooks。
|
|
37
|
+
|
|
38
|
+
## 包含的功能
|
|
39
|
+
|
|
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 命令
|
|
51
|
+
|
|
52
|
+
## 下一步
|
|
53
|
+
|
|
54
|
+
- 阅读 [Getting Started](/docs/getting-started) 创建并运行项目。
|
|
55
|
+
- 阅读 [Configuration](/docs/configuration) 自定义生成的站点。
|
|
56
|
+
- 阅读 [版本化文档](/docs/versioned-docs) 配置多个文档版本。
|
|
57
|
+
- 阅读 [Proxy 和 Markdown 路由](/docs/proxy) 添加自定义请求逻辑。
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Overview
|
|
3
|
+
description: Learn how Geistdocs packages the CLI, runtime, and template for documentation sites
|
|
4
|
+
type: overview
|
|
5
|
+
summary: Geistdocs is a packaged documentation system for creating Next.js and Fumadocs sites with shared runtime features.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
- /docs/migration
|
|
9
|
+
- /docs/configuration
|
|
10
|
+
---
|
|
11
|
+
|
|
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.
|
|
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>
|
|
17
|
+
|
|
18
|
+
## How Geistdocs works
|
|
19
|
+
|
|
20
|
+
Geistdocs has three main parts:
|
|
21
|
+
|
|
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.
|
|
25
|
+
|
|
26
|
+
```mermaid
|
|
27
|
+
flowchart TB
|
|
28
|
+
subgraph Package["@vercel/geistdocs package"]
|
|
29
|
+
cli["CLI: init, update, translate"]
|
|
30
|
+
runtime["Runtime: layout, routes, MDX, controls"]
|
|
31
|
+
bundledTemplate["Bundled template snapshot"]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
subgraph Site["Generated docs site"]
|
|
35
|
+
config["geistdocs.tsx"]
|
|
36
|
+
adapters["app/, components/geistdocs/, lib/geistdocs/"]
|
|
37
|
+
content["content/docs/*.mdx"]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
subgraph Platform["Geistdocs platform"]
|
|
41
|
+
translate["/translate"]
|
|
42
|
+
feedback["/feedback"]
|
|
43
|
+
tracking["/md-tracking"]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
cli --> bundledTemplate
|
|
47
|
+
bundledTemplate --> Site
|
|
48
|
+
adapters --> runtime
|
|
49
|
+
content --> adapters
|
|
50
|
+
cli --> translate
|
|
51
|
+
runtime --> feedback
|
|
52
|
+
runtime --> tracking
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## What you edit
|
|
56
|
+
|
|
57
|
+
Most projects start by editing these files:
|
|
58
|
+
|
|
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
|
+
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`.
|
|
71
|
+
|
|
72
|
+
## Included features
|
|
73
|
+
|
|
74
|
+
- MDX documentation with custom components
|
|
75
|
+
- Local content in `content/docs`
|
|
76
|
+
- Search and Ask AI
|
|
77
|
+
- Page actions, including feedback, copy page, open in chat, and edit on GitHub
|
|
78
|
+
- Agent-readiness metadata with `/agents.md`
|
|
79
|
+
- Raw Markdown routes for AI tools
|
|
80
|
+
- `llms.txt`
|
|
81
|
+
- Versioned docs and multiple content sources
|
|
82
|
+
- Proxy hooks for custom request logic
|
|
83
|
+
- RSS feed
|
|
84
|
+
- Theme-aware images
|
|
85
|
+
- Internationalized routes
|
|
86
|
+
- CLI commands for init, update, and translation
|
|
87
|
+
|
|
88
|
+
## Next steps
|
|
89
|
+
|
|
90
|
+
- Follow [Getting Started](/docs/getting-started) to create and run a project.
|
|
91
|
+
- Read [Migration guide](/docs/migration) to move an existing docs site to package-backed Geistdocs.
|
|
92
|
+
- Read [Configuration](/docs/configuration) to customize the generated site.
|
|
93
|
+
- Read [Versioned docs](/docs/versioned-docs) to configure multiple docs versions.
|
|
94
|
+
- Read [Proxy and markdown routes](/docs/proxy) to add custom request logic.
|
|
95
|
+
- Read [Syntax](/docs/syntax) to write content with MDX components.
|