@vercel/geistdocs 1.2.2 → 1.3.0-canary.41d37f1

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.
Files changed (320) hide show
  1. package/dist/cli/index.js +3 -0
  2. package/dist/components/callout.d.ts +12 -0
  3. package/dist/components/callout.d.ts.map +1 -0
  4. package/dist/components/callout.js +7 -0
  5. package/dist/components/code-block-tabs.d.ts +7 -0
  6. package/dist/components/code-block-tabs.d.ts.map +1 -0
  7. package/dist/components/code-block-tabs.js +7 -0
  8. package/dist/components/code-block.d.ts +14 -0
  9. package/dist/components/code-block.d.ts.map +1 -0
  10. package/dist/components/code-block.js +41 -0
  11. package/dist/components/mermaid.d.ts +4 -0
  12. package/dist/components/mermaid.d.ts.map +1 -0
  13. package/dist/components/mermaid.js +44 -0
  14. package/dist/components/theme-aware-image.d.ts +12 -0
  15. package/dist/components/theme-aware-image.d.ts.map +1 -0
  16. package/dist/components/theme-aware-image.js +8 -0
  17. package/dist/components/video.d.ts +6 -0
  18. package/dist/components/video.d.ts.map +1 -0
  19. package/dist/components/video.js +3 -0
  20. package/dist/config.d.ts +52 -0
  21. package/dist/config.d.ts.map +1 -0
  22. package/dist/config.js +1 -0
  23. package/dist/controls.d.ts +15 -0
  24. package/dist/controls.d.ts.map +1 -0
  25. package/dist/controls.js +52 -0
  26. package/dist/internal/chat/context.d.ts +19 -0
  27. package/dist/internal/chat/context.d.ts.map +1 -0
  28. package/dist/internal/chat/context.js +36 -0
  29. package/dist/internal/chat/conversation.d.ts +10 -0
  30. package/dist/internal/chat/conversation.d.ts.map +1 -0
  31. package/dist/internal/chat/conversation.js +16 -0
  32. package/dist/internal/chat/copy-chat.d.ts +5 -0
  33. package/dist/internal/chat/copy-chat.d.ts.map +1 -0
  34. package/dist/internal/chat/copy-chat.js +35 -0
  35. package/dist/internal/chat/db.d.ts +13 -0
  36. package/dist/internal/chat/db.d.ts.map +1 -0
  37. package/dist/internal/chat/db.js +19 -0
  38. package/dist/internal/chat/message-metadata.d.ts +8 -0
  39. package/dist/internal/chat/message-metadata.d.ts.map +1 -0
  40. package/dist/internal/chat/message-metadata.js +29 -0
  41. package/dist/internal/chat/message.d.ts +11 -0
  42. package/dist/internal/chat/message.d.ts.map +1 -0
  43. package/dist/internal/chat/message.js +11 -0
  44. package/dist/internal/chat/prompt-input.d.ts +13 -0
  45. package/dist/internal/chat/prompt-input.d.ts.map +1 -0
  46. package/dist/internal/chat/prompt-input.js +39 -0
  47. package/dist/internal/chat/shell.d.ts +2 -0
  48. package/dist/internal/chat/shell.d.ts.map +1 -0
  49. package/dist/internal/chat/shell.js +194 -0
  50. package/dist/internal/chat/shimmer.d.ts +11 -0
  51. package/dist/internal/chat/shimmer.d.ts.map +1 -0
  52. package/dist/internal/chat/shimmer.js +18 -0
  53. package/dist/internal/chat/sources.d.ts +13 -0
  54. package/dist/internal/chat/sources.d.ts.map +1 -0
  55. package/dist/internal/chat/sources.js +9 -0
  56. package/dist/internal/chat/suggestion.d.ts +11 -0
  57. package/dist/internal/chat/suggestion.d.ts.map +1 -0
  58. package/dist/internal/chat/suggestion.js +12 -0
  59. package/dist/internal/cn.d.ts +3 -0
  60. package/dist/internal/cn.d.ts.map +1 -0
  61. package/dist/internal/cn.js +3 -0
  62. package/dist/internal/feedback-action.d.ts +14 -0
  63. package/dist/internal/feedback-action.d.ts.map +1 -0
  64. package/dist/internal/feedback-action.js +34 -0
  65. package/dist/internal/i18n.d.ts +6 -0
  66. package/dist/internal/i18n.d.ts.map +1 -0
  67. package/dist/internal/i18n.js +18 -0
  68. package/dist/internal/languages.d.ts +7 -0
  69. package/dist/internal/languages.d.ts.map +1 -0
  70. package/dist/internal/languages.js +18 -0
  71. package/dist/internal/not-implemented.d.ts +2 -0
  72. package/dist/internal/not-implemented.d.ts.map +1 -0
  73. package/dist/internal/not-implemented.js +4 -0
  74. package/dist/internal/page-actions-client.d.ts +14 -0
  75. package/dist/internal/page-actions-client.d.ts.map +1 -0
  76. package/dist/internal/page-actions-client.js +154 -0
  77. package/dist/internal/page-actions.d.ts +18 -0
  78. package/dist/internal/page-actions.d.ts.map +1 -0
  79. package/dist/internal/page-actions.js +4 -0
  80. package/dist/internal/search.d.ts +5 -0
  81. package/dist/internal/search.d.ts.map +1 -0
  82. package/dist/internal/search.js +14 -0
  83. package/dist/internal/sidebar.d.ts +6 -0
  84. package/dist/internal/sidebar.d.ts.map +1 -0
  85. package/dist/internal/sidebar.js +37 -0
  86. package/dist/internal/ui/button-group.d.ts +13 -0
  87. package/dist/internal/ui/button-group.d.ts.map +1 -0
  88. package/dist/internal/ui/button-group.js +26 -0
  89. package/dist/internal/ui/button.d.ts +12 -0
  90. package/dist/internal/ui/button.d.ts.map +1 -0
  91. package/dist/internal/ui/button.js +33 -0
  92. package/dist/internal/ui/card.d.ts +6 -0
  93. package/dist/internal/ui/card.d.ts.map +1 -0
  94. package/dist/internal/ui/card.js +14 -0
  95. package/dist/internal/ui/collapsible.d.ts +6 -0
  96. package/dist/internal/ui/collapsible.d.ts.map +1 -0
  97. package/dist/internal/ui/collapsible.js +12 -0
  98. package/dist/internal/ui/drawer.d.ts +6 -0
  99. package/dist/internal/ui/drawer.d.ts.map +1 -0
  100. package/dist/internal/ui/drawer.js +13 -0
  101. package/dist/internal/ui/dropdown-menu.d.ts +22 -0
  102. package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
  103. package/dist/internal/ui/dropdown-menu.js +41 -0
  104. package/dist/internal/ui/input-group.d.ts +15 -0
  105. package/dist/internal/ui/input-group.d.ts.map +1 -0
  106. package/dist/internal/ui/input-group.js +44 -0
  107. package/dist/internal/ui/input.d.ts +3 -0
  108. package/dist/internal/ui/input.d.ts.map +1 -0
  109. package/dist/internal/ui/input.js +5 -0
  110. package/dist/internal/ui/kbd.d.ts +4 -0
  111. package/dist/internal/ui/kbd.d.ts.map +1 -0
  112. package/dist/internal/ui/kbd.js +8 -0
  113. package/dist/internal/ui/popover.d.ts +6 -0
  114. package/dist/internal/ui/popover.d.ts.map +1 -0
  115. package/dist/internal/ui/popover.js +13 -0
  116. package/dist/internal/ui/scroll-area.d.ts +5 -0
  117. package/dist/internal/ui/scroll-area.d.ts.map +1 -0
  118. package/dist/internal/ui/scroll-area.js +12 -0
  119. package/dist/internal/ui/separator.d.ts +4 -0
  120. package/dist/internal/ui/separator.d.ts.map +1 -0
  121. package/dist/internal/ui/separator.js +7 -0
  122. package/dist/internal/ui/sheet.d.ts +10 -0
  123. package/dist/internal/ui/sheet.d.ts.map +1 -0
  124. package/dist/internal/ui/sheet.js +24 -0
  125. package/dist/internal/ui/sonner.d.ts +3 -0
  126. package/dist/internal/ui/sonner.d.ts.map +1 -0
  127. package/dist/internal/ui/sonner.js +20 -0
  128. package/dist/internal/ui/spinner.d.ts +3 -0
  129. package/dist/internal/ui/spinner.d.ts.map +1 -0
  130. package/dist/internal/ui/spinner.js +6 -0
  131. package/dist/internal/ui/textarea.d.ts +3 -0
  132. package/dist/internal/ui/textarea.d.ts.map +1 -0
  133. package/dist/internal/ui/textarea.js +5 -0
  134. package/dist/internal/ui/tooltip.d.ts +7 -0
  135. package/dist/internal/ui/tooltip.d.ts.map +1 -0
  136. package/dist/internal/ui/tooltip.js +16 -0
  137. package/dist/internal/use-mobile.d.ts +2 -0
  138. package/dist/internal/use-mobile.d.ts.map +1 -0
  139. package/dist/internal/use-mobile.js +16 -0
  140. package/dist/layout.d.ts +18 -0
  141. package/dist/layout.d.ts.map +1 -0
  142. package/dist/layout.js +49 -0
  143. package/dist/mdx.d.ts +36 -0
  144. package/dist/mdx.d.ts.map +1 -0
  145. package/dist/mdx.js +72 -0
  146. package/dist/pages/docs.d.ts +55 -0
  147. package/dist/pages/docs.d.ts.map +1 -0
  148. package/dist/pages/docs.js +63 -0
  149. package/dist/proxy.d.ts +21 -0
  150. package/dist/proxy.d.ts.map +1 -0
  151. package/dist/proxy.js +109 -0
  152. package/dist/routes/chat.d.ts +13 -0
  153. package/dist/routes/chat.d.ts.map +1 -0
  154. package/dist/routes/chat.js +229 -0
  155. package/dist/routes/llms.d.ts +33 -0
  156. package/dist/routes/llms.d.ts.map +1 -0
  157. package/dist/routes/llms.js +39 -0
  158. package/dist/routes/search.d.ts +10 -0
  159. package/dist/routes/search.d.ts.map +1 -0
  160. package/dist/routes/search.js +33 -0
  161. package/dist/routes/sitemap.d.ts +35 -0
  162. package/dist/routes/sitemap.d.ts.map +1 -0
  163. package/dist/routes/sitemap.js +150 -0
  164. package/dist/source.d.ts +30 -0
  165. package/dist/source.d.ts.map +1 -0
  166. package/dist/source.js +72 -0
  167. package/package.json +129 -9
  168. package/styles.css +193 -0
  169. package/template/_gitignore +1 -0
  170. package/template/app/[lang]/(home)/components/centered-section.tsx +26 -0
  171. package/template/app/[lang]/(home)/components/cta.tsx +19 -0
  172. package/template/app/[lang]/(home)/components/hero.tsx +27 -0
  173. package/template/app/[lang]/(home)/components/one-two-section.tsx +25 -0
  174. package/template/app/[lang]/(home)/components/templates.tsx +50 -0
  175. package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
  176. package/template/app/[lang]/(home)/layout.tsx +14 -0
  177. package/template/app/[lang]/(home)/page.tsx +126 -0
  178. package/template/app/[lang]/docs/[[...slug]]/page.tsx +19 -0
  179. package/template/app/[lang]/docs/layout.tsx +14 -0
  180. package/template/app/[lang]/layout.tsx +29 -0
  181. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
  182. package/template/app/[lang]/llms.txt/route.ts +6 -0
  183. package/template/app/[lang]/og/[...slug]/background.png +0 -0
  184. package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
  185. package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
  186. package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
  187. package/template/app/[lang]/rss.xml/route.ts +52 -0
  188. package/template/app/[lang]/sitemap.md/route.ts +9 -0
  189. package/template/app/actions/feedback/emotions.ts +18 -0
  190. package/template/app/actions/feedback/index.ts +45 -0
  191. package/template/app/api/chat/route.ts +8 -0
  192. package/template/app/api/search/route.ts +5 -0
  193. package/template/app/favicon.ico +0 -0
  194. package/template/app/global.css +2 -0
  195. package/template/app/robots.ts +14 -0
  196. package/template/app/sitemap.ts +36 -0
  197. package/template/app/styles/geistdocs.css +553 -0
  198. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +35 -0
  199. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +27 -0
  200. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +27 -0
  201. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +30 -0
  202. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +27 -0
  203. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +27 -0
  204. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +25 -0
  205. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +27 -0
  206. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +36 -0
  207. package/template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx +11 -0
  208. package/template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx +14 -0
  209. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +29 -0
  210. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +38 -0
  211. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +42 -0
  212. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +42 -0
  213. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +31 -0
  214. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +29 -0
  215. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +24 -0
  216. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +73 -0
  217. package/template/components/geistdocs/callout.tsx +40 -0
  218. package/template/components/geistdocs/chat.tsx +24 -0
  219. package/template/components/geistdocs/code-block-tabs.tsx +61 -0
  220. package/template/components/geistdocs/code-block.tsx +134 -0
  221. package/template/components/geistdocs/copy-page.tsx +27 -0
  222. package/template/components/geistdocs/desktop-menu.tsx +52 -0
  223. package/template/components/geistdocs/docs-layout.tsx +20 -0
  224. package/template/components/geistdocs/docs-page.tsx +35 -0
  225. package/template/components/geistdocs/edit-source.tsx +30 -0
  226. package/template/components/geistdocs/feedback.tsx +139 -0
  227. package/template/components/geistdocs/footer.tsx +30 -0
  228. package/template/components/geistdocs/github-button.tsx +19 -0
  229. package/template/components/geistdocs/home-layout.tsx +46 -0
  230. package/template/components/geistdocs/icons.tsx +13 -0
  231. package/template/components/geistdocs/installer.tsx +58 -0
  232. package/template/components/geistdocs/language-selector.tsx +3 -0
  233. package/template/components/geistdocs/mdx-components.tsx +5 -0
  234. package/template/components/geistdocs/mermaid.tsx +68 -0
  235. package/template/components/geistdocs/mobile-docs-bar.tsx +81 -0
  236. package/template/components/geistdocs/mobile-menu.tsx +150 -0
  237. package/template/components/geistdocs/navbar-logo.tsx +124 -0
  238. package/template/components/geistdocs/navbar.tsx +22 -0
  239. package/template/components/geistdocs/provider.tsx +31 -0
  240. package/template/components/geistdocs/rss-button.tsx +10 -0
  241. package/template/components/geistdocs/scroll-top.tsx +21 -0
  242. package/template/components/geistdocs/search.tsx +17 -0
  243. package/template/components/geistdocs/sidebar.tsx +128 -0
  244. package/template/components/geistdocs/theme-aware-image.tsx +22 -0
  245. package/template/components/geistdocs/theme-toggle.tsx +3 -0
  246. package/template/components/geistdocs/video.tsx +16 -0
  247. package/template/components/ui/badge.tsx +46 -0
  248. package/template/components/ui/button-group.tsx +83 -0
  249. package/template/components/ui/button.tsx +60 -0
  250. package/template/components/ui/card.tsx +92 -0
  251. package/template/components/ui/collapsible.tsx +33 -0
  252. package/template/components/ui/command-prompt.tsx +488 -0
  253. package/template/components/ui/command.tsx +184 -0
  254. package/template/components/ui/dialog.tsx +143 -0
  255. package/template/components/ui/drawer.tsx +135 -0
  256. package/template/components/ui/dropdown-menu.tsx +257 -0
  257. package/template/components/ui/hover-card.tsx +44 -0
  258. package/template/components/ui/input-group.tsx +170 -0
  259. package/template/components/ui/input.tsx +21 -0
  260. package/template/components/ui/kbd.tsx +28 -0
  261. package/template/components/ui/navigation-menu.tsx +192 -0
  262. package/template/components/ui/popover.tsx +48 -0
  263. package/template/components/ui/scroll-area.tsx +58 -0
  264. package/template/components/ui/select.tsx +187 -0
  265. package/template/components/ui/separator.tsx +28 -0
  266. package/template/components/ui/sheet.tsx +139 -0
  267. package/template/components/ui/sonner.tsx +40 -0
  268. package/template/components/ui/spinner.tsx +16 -0
  269. package/template/components/ui/textarea.tsx +18 -0
  270. package/template/components/ui/tooltip.tsx +61 -0
  271. package/template/components.json +22 -0
  272. package/template/content/docs/ask-ai.cn.mdx +85 -0
  273. package/template/content/docs/ask-ai.mdx +85 -0
  274. package/template/content/docs/configuration.cn.mdx +115 -0
  275. package/template/content/docs/configuration.mdx +115 -0
  276. package/template/content/docs/deployment.cn.mdx +34 -0
  277. package/template/content/docs/deployment.mdx +34 -0
  278. package/template/content/docs/edit-on-github.cn.mdx +47 -0
  279. package/template/content/docs/edit-on-github.mdx +47 -0
  280. package/template/content/docs/env.cn.mdx +25 -0
  281. package/template/content/docs/env.mdx +25 -0
  282. package/template/content/docs/feedback.cn.mdx +85 -0
  283. package/template/content/docs/feedback.mdx +85 -0
  284. package/template/content/docs/getting-started.cn.mdx +86 -0
  285. package/template/content/docs/getting-started.mdx +86 -0
  286. package/template/content/docs/index.cn.mdx +54 -0
  287. package/template/content/docs/index.mdx +87 -0
  288. package/template/content/docs/internationalization.cn.mdx +113 -0
  289. package/template/content/docs/internationalization.mdx +117 -0
  290. package/template/content/docs/llms-txt.cn.mdx +50 -0
  291. package/template/content/docs/llms-txt.mdx +50 -0
  292. package/template/content/docs/md.cn.mdx +68 -0
  293. package/template/content/docs/md.mdx +68 -0
  294. package/template/content/docs/meta.json +21 -0
  295. package/template/content/docs/open-in-chat.cn.mdx +78 -0
  296. package/template/content/docs/open-in-chat.mdx +78 -0
  297. package/template/content/docs/provider.cn.mdx +69 -0
  298. package/template/content/docs/provider.mdx +69 -0
  299. package/template/content/docs/rss.cn.mdx +104 -0
  300. package/template/content/docs/rss.mdx +104 -0
  301. package/template/content/docs/syntax.cn.mdx +416 -0
  302. package/template/content/docs/syntax.mdx +407 -0
  303. package/template/content/docs/theme-aware-image.mdx +53 -0
  304. package/template/geistdocs.tsx +51 -0
  305. package/template/hooks/geistdocs/use-sidebar.ts +13 -0
  306. package/template/hooks/use-mobile.ts +19 -0
  307. package/template/lib/geistdocs/config.tsx +27 -0
  308. package/template/lib/geistdocs/fonts.ts +18 -0
  309. package/template/lib/geistdocs/i18n.ts +13 -0
  310. package/template/lib/geistdocs/md-tracking.ts +56 -0
  311. package/template/lib/geistdocs/source.ts +12 -0
  312. package/template/lib/utils.ts +6 -0
  313. package/template/next.config.ts +22 -0
  314. package/template/package.json +63 -0
  315. package/template/postcss.config.mjs +5 -0
  316. package/template/proxy.ts +16 -0
  317. package/template/source.config.ts +62 -0
  318. package/template/tsconfig.json +37 -0
  319. package/dist/index.js +0 -2
  320. /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
@@ -0,0 +1,115 @@
1
+ ---
2
+ title: 配置
3
+ description: 在不修改源文件的情况下自定义您的 Geistdocs 站点
4
+ type: reference
5
+ summary: 通过 geistdocs.tsx 配置文件自定义您的 Geistdocs 站点,无需修改源代码。
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/provider
10
+ - /docs/env
11
+ ---
12
+
13
+ 虽然 Geistdocs 完全开源、可组合且可复制粘贴,但最好在不修改源代码的情况下自定义您的站点。这样可以在保留自定义内容的同时,更容易在未来更新 Geistdocs。
14
+
15
+ 为此,Geistdocs 使用一个根级配置文件,让您可以在不接触源代码的情况下自定义文档站点。
16
+
17
+ ## 配置文件
18
+
19
+ 项目根目录下的 `geistdocs.tsx` 文件包含所有自定义选项:
20
+
21
+ ```tsx title="geistdocs.tsx"
22
+ import { BookHeartIcon } from "lucide-react";
23
+
24
+ export const Logo = () => (
25
+ <div className="flex items-center gap-2">
26
+ <BookHeartIcon className="size-5" />
27
+ <p className="font-semibold text-xl tracking-tight">Geistdocs</p>
28
+ </div>
29
+ );
30
+
31
+ export const nav = [
32
+ {
33
+ label: "Docs",
34
+ href: "/docs",
35
+ },
36
+ ];
37
+
38
+ export const suggestions = [
39
+ "What is Vercel?",
40
+ "What can I deploy with Vercel?",
41
+ "What is Fluid Compute?",
42
+ "How much does Vercel cost?",
43
+ ];
44
+
45
+ export const title = "Geistdocs Documentation";
46
+
47
+ export const prompt =
48
+ "You are a helpful assistant specializing in answering questions about Geistdocs, a modern documentation template built with Next.js and Fumadocs.";
49
+ ```
50
+
51
+ ## 配置选项
52
+
53
+ ### `Logo`
54
+
55
+ 自定义显示在站点页眉中的徽标组件:
56
+
57
+ ```tsx title="geistdocs.tsx"
58
+ export const Logo = () => (
59
+ <div className="flex items-center gap-2">
60
+ <YourIcon className="size-5" />
61
+ <p className="font-semibold text-xl tracking-tight">Your Brand</p>
62
+ </div>
63
+ );
64
+ ```
65
+
66
+ ### `nav`
67
+
68
+ 定义显示在页眉中的导航链接:
69
+
70
+ ```tsx title="geistdocs.tsx"
71
+ export const nav = [
72
+ {
73
+ label: "Documentation",
74
+ href: "/docs",
75
+ },
76
+ {
77
+ label: "API Reference",
78
+ href: "/api",
79
+ },
80
+ {
81
+ label: "GitHub",
82
+ href: "https://github.com/your-org/your-repo",
83
+ },
84
+ ];
85
+ ```
86
+
87
+ ### `suggestions`
88
+
89
+ 为 AI 助手配置建议的问题:
90
+
91
+ ```tsx title="geistdocs.tsx"
92
+ export const suggestions = [
93
+ "How do I get started?",
94
+ "What are the key features?",
95
+ "How do I deploy my site?",
96
+ "Where can I get help?",
97
+ ];
98
+ ```
99
+
100
+ ### `title`
101
+
102
+ 设置文档站点的主标题:
103
+
104
+ ```tsx title="geistdocs.tsx"
105
+ export const title = "Your Product Documentation";
106
+ ```
107
+
108
+ ### `prompt`
109
+
110
+ 自定义 AI 助手的系统提示,以匹配您的文档上下文:
111
+
112
+ ```tsx title="geistdocs.tsx"
113
+ export const prompt =
114
+ "You are a helpful assistant specializing in answering questions about Your Product, a platform for building amazing applications.";
115
+ ```
@@ -0,0 +1,115 @@
1
+ ---
2
+ title: Configuration
3
+ description: Customize your Geistdocs site without modifying source files
4
+ type: reference
5
+ summary: Customize your Geistdocs site through the geistdocs.tsx configuration file without modifying source code.
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/provider
10
+ - /docs/env
11
+ ---
12
+
13
+ While Geistdocs is fully open source, composable and copy-pasteable, it's preferable to customize your site without modifying the source code. This makes it easier to update Geistdocs in the future while preserving your customizations.
14
+
15
+ To enable this, Geistdocs uses a root-level configuration file that lets you customize your documentation site without touching the source code.
16
+
17
+ ## Configuration File
18
+
19
+ The `geistdocs.tsx` file in your project root contains all customization options:
20
+
21
+ ```tsx title="geistdocs.tsx"
22
+ import { BookHeartIcon } from "lucide-react";
23
+
24
+ export const Logo = () => (
25
+ <div className="flex items-center gap-2">
26
+ <BookHeartIcon className="size-5" />
27
+ <p className="font-semibold text-xl tracking-tight">Geistdocs</p>
28
+ </div>
29
+ );
30
+
31
+ export const nav = [
32
+ {
33
+ label: "Docs",
34
+ href: "/docs",
35
+ },
36
+ ];
37
+
38
+ export const suggestions = [
39
+ "What is Vercel?",
40
+ "What can I deploy with Vercel?",
41
+ "What is Fluid Compute?",
42
+ "How much does Vercel cost?",
43
+ ];
44
+
45
+ export const title = "Geistdocs Documentation";
46
+
47
+ export const prompt =
48
+ "You are a helpful assistant specializing in answering questions about Geistdocs, a modern documentation template built with Next.js and Fumadocs.";
49
+ ```
50
+
51
+ ## Configuration Options
52
+
53
+ ### `Logo`
54
+
55
+ Customize the logo component displayed in your site header:
56
+
57
+ ```tsx title="geistdocs.tsx"
58
+ export const Logo = () => (
59
+ <div className="flex items-center gap-2">
60
+ <YourIcon className="size-5" />
61
+ <p className="font-semibold text-xl tracking-tight">Your Brand</p>
62
+ </div>
63
+ );
64
+ ```
65
+
66
+ ### `nav`
67
+
68
+ Define navigation links shown in the header:
69
+
70
+ ```tsx title="geistdocs.tsx"
71
+ export const nav = [
72
+ {
73
+ label: "Documentation",
74
+ href: "/docs",
75
+ },
76
+ {
77
+ label: "API Reference",
78
+ href: "/api",
79
+ },
80
+ {
81
+ label: "GitHub",
82
+ href: "https://github.com/your-org/your-repo",
83
+ },
84
+ ];
85
+ ```
86
+
87
+ ### `suggestions`
88
+
89
+ Configure suggested questions for the AI assistant:
90
+
91
+ ```tsx title="geistdocs.tsx"
92
+ export const suggestions = [
93
+ "How do I get started?",
94
+ "What are the key features?",
95
+ "How do I deploy my site?",
96
+ "Where can I get help?",
97
+ ];
98
+ ```
99
+
100
+ ### `title`
101
+
102
+ Set the main title for your documentation site:
103
+
104
+ ```tsx title="geistdocs.tsx"
105
+ export const title = "Your Product Documentation";
106
+ ```
107
+
108
+ ### `prompt`
109
+
110
+ Customize the system prompt for the AI assistant to match your documentation context:
111
+
112
+ ```tsx title="geistdocs.tsx"
113
+ export const prompt =
114
+ "You are a helpful assistant specializing in answering questions about Your Product, a platform for building amazing applications.";
115
+ ```
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: 部署到 Vercel
3
+ description: 学习如何将你的 Geistdocs 网站部署到 Vercel
4
+ type: guide
5
+ summary: 使用正确的项目设置从 Vercel 控制台部署您的 Geistdocs 站点。
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ - /docs/env
9
+ related:
10
+ - /docs/configuration
11
+ ---
12
+
13
+ ## 先决条件
14
+
15
+ 在部署之前,你需要:
16
+
17
+ - 一个 [GitHub 帐户](https://github.com) 并包含你的 Geistdocs 仓库
18
+ - 一个 [Vercel 帐户](https://vercel.com)(在 [vercel.com](https://vercel.com) 注册)
19
+ - 你的 Vercel 帐户已连接到你的 GitHub 帐户
20
+ - 已准备好的环境变量(参见 [环境变量](/docs/env))
21
+
22
+ ## 部署到 Vercel
23
+
24
+ 要从 Vercel 控制面板部署:
25
+
26
+ 1. 前往 [vercel.com/new](https://vercel.com/new)
27
+ 2. 选择你的 Geistdocs 仓库
28
+ 3. 配置你的项目设置:
29
+ - **框架预设**: Next.js(自动检测)
30
+ - **构建命令**: `pnpm build` or `npm run build`
31
+ - **输出目录**: `.next` (默认)
32
+ - **安装命令**: `pnpm install` or `npm install`
33
+ 4. 添加你的环境变量(参见 [环境变量](/docs/env))
34
+ 5. 点击 "部署"
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: Deploy to Vercel
3
+ description: Learn how to deploy your Geistdocs site to Vercel
4
+ type: guide
5
+ summary: Deploy your Geistdocs site to Vercel from the dashboard with the correct project settings.
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ - /docs/env
9
+ related:
10
+ - /docs/configuration
11
+ ---
12
+
13
+ ## Prerequisites
14
+
15
+ Before deploying, you need:
16
+
17
+ - A [GitHub account](https://github.com) with your Geistdocs repository
18
+ - A [Vercel account](https://vercel.com) (sign up at [vercel.com](https://vercel.com))
19
+ - Your Vercel account connected to your GitHub account
20
+ - Environment variables ready (see [Environment Variables](/docs/env))
21
+
22
+ ## Deploy to Vercel
23
+
24
+ To deploy from the Vercel dashboard:
25
+
26
+ 1. Go to [vercel.com/new](https://vercel.com/new)
27
+ 2. Select your Geistdocs repository
28
+ 3. Configure your project settings:
29
+ - **Framework Preset**: Next.js (automatically detected)
30
+ - **Build Command**: `pnpm build` or `npm run build`
31
+ - **Output Directory**: `.next` (default)
32
+ - **Install Command**: `pnpm install` or `npm install`
33
+ 4. Add your environment variables (see [Environment Variables](/docs/env))
34
+ 5. Click "Deploy"
@@ -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,47 @@
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 provides a direct link for readers to propose changes to your documentation. This link appears in the table of contents sidebar on every documentation page, making it easy for users to contribute fixes, improvements, or updates.
11
+
12
+ ## How It Works
13
+
14
+ When users click the "Edit this page on GitHub" link, they are taken directly to the source file in your GitHub repository. From there, they can:
15
+
16
+ 1. Fork the repository (if they haven't already)
17
+ 2. Make their edits in the GitHub web editor
18
+ 3. Submit a pull request with their changes
19
+
20
+ This workflow leverages GitHub's built-in editing capabilities, making it straightforward for both technical and non-technical users to contribute.
21
+
22
+ ## Configuration
23
+
24
+ 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:
25
+
26
+ ```tsx
27
+ export const github = {
28
+ owner: "your-username",
29
+ repo: "your-repo-name",
30
+ };
31
+ ```
32
+
33
+ If these values are not set, the link will not appear on your documentation pages.
34
+
35
+ ### Generated URL Format
36
+
37
+ The link follows this pattern:
38
+
39
+ ```
40
+ https://github.com/{owner}/{repo}/edit/main/content/docs/{file-path}
41
+ ```
42
+
43
+ For example, if your page is located at `content/docs/getting-started.mdx`, the generated link would be:
44
+
45
+ ```
46
+ https://github.com/your-username/your-repo-name/edit/main/content/docs/getting-started.mdx
47
+ ```
@@ -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,25 @@
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
+ ## `AI_GATEWAY_API_KEY`
16
+
17
+ The API key for the AI gateway. This is used to power the AI chat functionality.
18
+
19
+ <Callout>This is automatically set when deploying to Vercel.</Callout>
20
+
21
+ ## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`
22
+
23
+ The production URL of the Geistdocs site. This is automatically set when deploying to Vercel.
24
+
25
+ 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,85 @@
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 allows readers to share their thoughts about your documentation pages through an interactive widget. Feedback is automatically posted to a centralized GitHub repository as issues, making it easy to track, label, and respond to user input.
14
+
15
+ ## How It Works
16
+
17
+ The feedback widget appears in the table of contents sidebar on every documentation page. When users click "Give feedback", they can:
18
+
19
+ 1. Write their feedback message
20
+ 2. Select an emotion that represents their experience (🤩, 🙂, 😕, 😭)
21
+ 3. Optionally provide their name and email
22
+ 4. Submit their feedback
23
+
24
+ ### Feedback Workflow
25
+
26
+ When feedback is submitted:
27
+
28
+ 1. The feedback is validated against a JSON schema
29
+ 2. A new GitHub Issue is created in the configured feedback repository
30
+ 3. Labels are automatically applied based on the emotion, topic, and other metadata
31
+ 4. User details and metadata are formatted into a structured markdown table
32
+
33
+ Each piece of feedback creates a separate issue, allowing for individual tracking and resolution.
34
+
35
+ ## Feedback Schema
36
+
37
+ The API accepts the following fields:
38
+
39
+ | Field | Type | Required | Max Length | Description |
40
+ | --------- | ------ | -------- | ---------- | ------------------------------------- |
41
+ | `note` | string | Yes | 16,384 | The feedback message |
42
+ | `url` | string | No | 1,024 | Page URL where feedback was submitted |
43
+ | `emotion` | string | No | 1 | Emoji representing user sentiment |
44
+ | `topic` | string | No | 1,024 | Feedback topic/category |
45
+ | `name` | string | No | 1,024 | User's name |
46
+ | `email` | string | No | 1,024 | User's email |
47
+ | `ua` | string | No | 256 | User agent string |
48
+ | `label` | string | No | 64 | Custom label for the issue |
49
+ | `thumbs` | string | No | 4 | Thumbs up/down indicator |
50
+ | `reason` | string | No | 10 | Reason for thumbs down |
51
+ | `plan` | string | No | 10 | User's plan type |
52
+
53
+ Additional fields are captured as metadata and displayed in the issue body.
54
+
55
+ ## Features
56
+
57
+ ### Automatic Labeling
58
+
59
+ Issues are automatically labeled based on:
60
+
61
+ - **Emotion**: `emotion-amazed`, `emotion-happy`, `emotion-sad`, `emotion-cry`
62
+ - **Topic**: `topic-{topic-name}`
63
+ - **Plan**: `{plan}-plan`
64
+ - **Thumbs**: `thumbs-up`, `thumbs-down`
65
+ - **Reason**: `reason-{reason}` (for thumbs down)
66
+ - **Custom labels**: Any label passed via the `label` field
67
+ - **Default labels**: `unresolved`, `vercel-site`
68
+
69
+ ### Structured Issue Body
70
+
71
+ Each issue includes a formatted markdown body with:
72
+
73
+ - The feedback note
74
+ - URL where feedback was submitted
75
+ - User details table (email, context, IP, user agent)
76
+ - Metadata table for any additional fields
77
+
78
+ ### Metadata Support
79
+
80
+ 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:
81
+
82
+ - User IDs
83
+ - Feature flags
84
+ - Experiment groups
85
+ - Custom tracking data