@vercel/geistdocs 1.3.0-canary.5af98bc → 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.
Files changed (362) hide show
  1. package/dist/assets/icons/icon-arrow-up-right-small.d.ts +8 -0
  2. package/dist/assets/icons/icon-arrow-up-right-small.d.ts.map +1 -0
  3. package/dist/assets/icons/icon-arrow-up-right-small.js +4 -0
  4. package/dist/assets/icons/icon-arrow-up-right.d.ts +5 -0
  5. package/dist/assets/icons/icon-arrow-up-right.d.ts.map +1 -0
  6. package/dist/assets/icons/icon-arrow-up-right.js +4 -0
  7. package/dist/assets/icons/icon-check.d.ts +5 -0
  8. package/dist/assets/icons/icon-check.d.ts.map +1 -0
  9. package/dist/assets/icons/icon-check.js +4 -0
  10. package/dist/assets/icons/icon-chevron-down-small.d.ts +8 -0
  11. package/dist/assets/icons/icon-chevron-down-small.d.ts.map +1 -0
  12. package/dist/assets/icons/icon-chevron-down-small.js +7 -0
  13. package/dist/assets/icons/icon-chevron-right.d.ts +5 -0
  14. package/dist/assets/icons/icon-chevron-right.d.ts.map +1 -0
  15. package/dist/assets/icons/icon-chevron-right.js +4 -0
  16. package/dist/assets/icons/icon-copy.d.ts +5 -0
  17. package/dist/assets/icons/icon-copy.d.ts.map +1 -0
  18. package/dist/assets/icons/icon-copy.js +4 -0
  19. package/dist/assets/icons/icon-file-text.d.ts +5 -0
  20. package/dist/assets/icons/icon-file-text.d.ts.map +1 -0
  21. package/dist/assets/icons/icon-file-text.js +4 -0
  22. package/dist/assets/icons/icon-menu-alt.d.ts +5 -0
  23. package/dist/assets/icons/icon-menu-alt.d.ts.map +1 -0
  24. package/dist/assets/icons/icon-menu-alt.js +4 -0
  25. package/dist/assets/icons/icon-slash-forward.d.ts +8 -0
  26. package/dist/assets/icons/icon-slash-forward.d.ts.map +1 -0
  27. package/dist/assets/icons/icon-slash-forward.js +4 -0
  28. package/dist/assets/icons/index.d.ts +10 -0
  29. package/dist/assets/icons/index.d.ts.map +1 -0
  30. package/{template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx → dist/assets/icons/index.js} +0 -1
  31. package/dist/assets/logos/index.d.ts +15 -0
  32. package/dist/assets/logos/index.d.ts.map +1 -0
  33. package/{template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx → dist/assets/logos/index.js} +2 -1
  34. package/dist/assets/logos/logo-ai-elements.d.ts +8 -0
  35. package/dist/assets/logos/logo-ai-elements.d.ts.map +1 -0
  36. package/dist/assets/logos/logo-ai-elements.js +8 -0
  37. package/dist/assets/logos/logo-ai-sdk.d.ts +8 -0
  38. package/dist/assets/logos/logo-ai-sdk.d.ts.map +1 -0
  39. package/dist/assets/logos/logo-ai-sdk.js +8 -0
  40. package/dist/assets/logos/logo-chat-sdk.d.ts +8 -0
  41. package/dist/assets/logos/logo-chat-sdk.d.ts.map +1 -0
  42. package/dist/assets/logos/logo-chat-sdk.js +8 -0
  43. package/dist/assets/logos/logo-flags-sdk.d.ts +8 -0
  44. package/dist/assets/logos/logo-flags-sdk.d.ts.map +1 -0
  45. package/dist/assets/logos/logo-flags-sdk.js +8 -0
  46. package/dist/assets/logos/logo-icon-vercel.d.ts +9 -0
  47. package/dist/assets/logos/logo-icon-vercel.d.ts.map +1 -0
  48. package/dist/assets/logos/logo-icon-vercel.js +8 -0
  49. package/dist/assets/logos/logo-nextjs.d.ts +8 -0
  50. package/dist/assets/logos/logo-nextjs.d.ts.map +1 -0
  51. package/dist/assets/logos/logo-nextjs.js +7 -0
  52. package/dist/assets/logos/logo-streamdown.d.ts +8 -0
  53. package/dist/assets/logos/logo-streamdown.d.ts.map +1 -0
  54. package/dist/assets/logos/logo-streamdown.js +8 -0
  55. package/dist/assets/logos/logo-svelte-kit.d.ts +8 -0
  56. package/dist/assets/logos/logo-svelte-kit.d.ts.map +1 -0
  57. package/dist/assets/logos/logo-svelte-kit.js +7 -0
  58. package/dist/assets/logos/logo-vercel-oss.d.ts +8 -0
  59. package/dist/assets/logos/logo-vercel-oss.d.ts.map +1 -0
  60. package/dist/assets/logos/logo-vercel-oss.js +7 -0
  61. package/dist/assets/logos/logo-workflow-sdk.d.ts +8 -0
  62. package/dist/assets/logos/logo-workflow-sdk.d.ts.map +1 -0
  63. package/dist/assets/logos/logo-workflow-sdk.js +8 -0
  64. package/dist/cli/index.js +1 -1
  65. package/dist/components/button-group.d.ts +2 -0
  66. package/dist/components/button-group.d.ts.map +1 -0
  67. package/dist/components/button-group.js +2 -0
  68. package/dist/components/button.d.ts +2 -0
  69. package/dist/components/button.d.ts.map +1 -0
  70. package/dist/components/button.js +2 -0
  71. package/dist/components/card.d.ts +2 -0
  72. package/dist/components/card.d.ts.map +1 -0
  73. package/dist/components/card.js +2 -0
  74. package/dist/components/code-block-tabs.js +3 -3
  75. package/dist/components/code-block.js +3 -3
  76. package/dist/components/collapsible.d.ts +2 -0
  77. package/dist/components/collapsible.d.ts.map +1 -0
  78. package/dist/components/collapsible.js +3 -0
  79. package/dist/components/copy-prompt.js +3 -3
  80. package/dist/components/dialog.d.ts +13 -0
  81. package/dist/components/dialog.d.ts.map +1 -0
  82. package/dist/components/dialog.js +35 -0
  83. package/dist/components/drawer.d.ts +2 -0
  84. package/dist/components/drawer.d.ts.map +1 -0
  85. package/dist/components/drawer.js +3 -0
  86. package/dist/components/dropdown-menu.d.ts +2 -0
  87. package/dist/components/dropdown-menu.d.ts.map +1 -0
  88. package/dist/components/dropdown-menu.js +3 -0
  89. package/dist/components/input-group.d.ts +2 -0
  90. package/dist/components/input-group.d.ts.map +1 -0
  91. package/dist/components/input-group.js +3 -0
  92. package/dist/components/input.d.ts +2 -0
  93. package/dist/components/input.d.ts.map +1 -0
  94. package/dist/components/input.js +2 -0
  95. package/dist/components/kbd.d.ts +2 -0
  96. package/dist/components/kbd.d.ts.map +1 -0
  97. package/dist/components/kbd.js +2 -0
  98. package/dist/components/navigation-menu.d.ts +2 -0
  99. package/dist/components/navigation-menu.d.ts.map +1 -0
  100. package/dist/components/navigation-menu.js +3 -0
  101. package/dist/components/popover.d.ts +2 -0
  102. package/dist/components/popover.d.ts.map +1 -0
  103. package/dist/components/popover.js +3 -0
  104. package/dist/components/scroll-area.d.ts +2 -0
  105. package/dist/components/scroll-area.d.ts.map +1 -0
  106. package/dist/components/scroll-area.js +3 -0
  107. package/dist/components/separator.d.ts +2 -0
  108. package/dist/components/separator.d.ts.map +1 -0
  109. package/dist/components/separator.js +3 -0
  110. package/dist/components/sheet.d.ts +2 -0
  111. package/dist/components/sheet.d.ts.map +1 -0
  112. package/dist/components/sheet.js +3 -0
  113. package/dist/components/sonner.d.ts +2 -0
  114. package/dist/components/sonner.d.ts.map +1 -0
  115. package/dist/components/sonner.js +3 -0
  116. package/dist/components/spinner.d.ts +2 -0
  117. package/dist/components/spinner.d.ts.map +1 -0
  118. package/dist/components/spinner.js +2 -0
  119. package/dist/components/textarea.d.ts +2 -0
  120. package/dist/components/textarea.d.ts.map +1 -0
  121. package/dist/components/textarea.js +2 -0
  122. package/dist/components/tooltip.d.ts +2 -0
  123. package/dist/components/tooltip.d.ts.map +1 -0
  124. package/dist/components/tooltip.js +3 -0
  125. package/dist/config.d.ts +66 -1
  126. package/dist/config.d.ts.map +1 -1
  127. package/dist/controls.js +4 -4
  128. package/dist/footer.d.ts +8 -0
  129. package/dist/footer.d.ts.map +1 -0
  130. package/dist/footer.js +6 -0
  131. package/dist/home-layout.d.ts +11 -0
  132. package/dist/home-layout.d.ts.map +1 -0
  133. package/dist/home-layout.js +31 -0
  134. package/dist/internal/chat/conversation.js +1 -1
  135. package/dist/internal/chat/message.js +1 -1
  136. package/dist/internal/chat/prompt-input.js +1 -1
  137. package/dist/internal/chat/shell.d.ts.map +1 -1
  138. package/dist/internal/chat/shell.js +6 -5
  139. package/dist/internal/chat/sources.js +1 -1
  140. package/dist/internal/config-context.d.ts +10 -0
  141. package/dist/internal/config-context.d.ts.map +1 -0
  142. package/dist/internal/config-context.js +15 -0
  143. package/dist/internal/footer/github-button.d.ts +7 -0
  144. package/dist/internal/footer/github-button.d.ts.map +1 -0
  145. package/dist/internal/footer/github-button.js +10 -0
  146. package/dist/internal/footer/rss-button.d.ts +2 -0
  147. package/dist/internal/footer/rss-button.d.ts.map +1 -0
  148. package/dist/internal/footer/rss-button.js +4 -0
  149. package/dist/internal/localized-link.d.ts +8 -0
  150. package/dist/internal/localized-link.d.ts.map +1 -0
  151. package/dist/internal/localized-link.js +13 -0
  152. package/dist/internal/navbar/desktop-menu.d.ts +10 -0
  153. package/dist/internal/navbar/desktop-menu.d.ts.map +1 -0
  154. package/dist/internal/navbar/desktop-menu.js +11 -0
  155. package/dist/internal/navbar/mobile-menu.d.ts +7 -0
  156. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -0
  157. package/dist/internal/navbar/mobile-menu.js +44 -0
  158. package/dist/internal/navbar/navbar-logo.d.ts +16 -0
  159. package/dist/internal/navbar/navbar-logo.d.ts.map +1 -0
  160. package/dist/internal/navbar/navbar-logo.js +30 -0
  161. package/dist/internal/page-actions-client.d.ts.map +1 -1
  162. package/dist/internal/page-actions-client.js +17 -6
  163. package/dist/internal/page-visibility.d.ts +18 -0
  164. package/dist/internal/page-visibility.d.ts.map +1 -0
  165. package/dist/internal/page-visibility.js +24 -0
  166. package/dist/internal/provider-client.d.ts +1 -1
  167. package/dist/internal/provider-client.d.ts.map +1 -1
  168. package/dist/internal/provider-client.js +2 -1
  169. package/dist/internal/sidebar.d.ts +4 -1
  170. package/dist/internal/sidebar.d.ts.map +1 -1
  171. package/dist/internal/sidebar.js +4 -4
  172. package/dist/internal/ui/button-group.js +2 -2
  173. package/dist/internal/ui/button.d.ts +1 -1
  174. package/dist/internal/ui/button.d.ts.map +1 -1
  175. package/dist/internal/ui/button.js +7 -7
  176. package/dist/internal/ui/card.js +1 -1
  177. package/dist/internal/ui/drawer.js +1 -1
  178. package/dist/internal/ui/dropdown-menu.js +7 -7
  179. package/dist/internal/ui/input-group.js +2 -2
  180. package/dist/internal/ui/input.js +1 -1
  181. package/dist/internal/ui/kbd.js +1 -1
  182. package/dist/internal/ui/navigation-menu.d.ts +17 -0
  183. package/dist/internal/ui/navigation-menu.d.ts.map +1 -0
  184. package/dist/internal/ui/navigation-menu.js +38 -0
  185. package/dist/internal/ui/popover.js +1 -1
  186. package/dist/internal/ui/scroll-area.js +2 -2
  187. package/dist/internal/ui/separator.js +1 -1
  188. package/dist/internal/ui/sheet.js +4 -4
  189. package/dist/internal/ui/sonner.js +3 -3
  190. package/dist/internal/ui/textarea.js +1 -1
  191. package/dist/internal/ui/tooltip.js +1 -1
  192. package/dist/layout.d.ts +2 -1
  193. package/dist/layout.d.ts.map +1 -1
  194. package/dist/layout.js +2 -2
  195. package/dist/mdx.d.ts +55 -24
  196. package/dist/mdx.d.ts.map +1 -1
  197. package/dist/mdx.js +7 -46
  198. package/dist/mobile-docs-bar.d.ts +7 -0
  199. package/dist/mobile-docs-bar.d.ts.map +1 -0
  200. package/dist/mobile-docs-bar.js +13 -0
  201. package/dist/navbar.d.ts +7 -0
  202. package/dist/navbar.d.ts.map +1 -0
  203. package/dist/navbar.js +10 -0
  204. package/dist/pages/docs.d.ts +33 -5
  205. package/dist/pages/docs.d.ts.map +1 -1
  206. package/dist/pages/docs.js +46 -17
  207. package/dist/proxy.d.ts +24 -8
  208. package/dist/proxy.d.ts.map +1 -1
  209. package/dist/proxy.js +116 -36
  210. package/dist/routes/agents.d.ts +21 -0
  211. package/dist/routes/agents.d.ts.map +1 -0
  212. package/dist/routes/agents.js +201 -0
  213. package/dist/routes/chat.d.ts +11 -5
  214. package/dist/routes/chat.d.ts.map +1 -1
  215. package/dist/routes/chat.js +386 -65
  216. package/dist/routes/llms.d.ts +29 -10
  217. package/dist/routes/llms.d.ts.map +1 -1
  218. package/dist/routes/llms.js +80 -9
  219. package/dist/routes/search.d.ts +8 -5
  220. package/dist/routes/search.d.ts.map +1 -1
  221. package/dist/routes/search.js +52 -4
  222. package/dist/routes/sitemap.d.ts +15 -3
  223. package/dist/routes/sitemap.d.ts.map +1 -1
  224. package/dist/routes/sitemap.js +32 -6
  225. package/dist/shiki-theme.d.ts +20 -0
  226. package/dist/shiki-theme.d.ts.map +1 -0
  227. package/dist/shiki-theme.js +110 -0
  228. package/dist/source-config.d.ts +68 -0
  229. package/dist/source-config.d.ts.map +1 -0
  230. package/dist/source-config.js +161 -0
  231. package/dist/source.d.ts +155 -4
  232. package/dist/source.d.ts.map +1 -1
  233. package/dist/source.js +73 -3
  234. package/dist/versions.d.ts +45 -0
  235. package/dist/versions.d.ts.map +1 -0
  236. package/dist/versions.js +79 -0
  237. package/package.json +134 -9
  238. package/source-config.js +174 -0
  239. package/styles.css +465 -102
  240. package/template/AGENTS.md +95 -0
  241. package/template/app/[lang]/(home)/components/centered-section.tsx +1 -3
  242. package/template/app/[lang]/(home)/components/hero.tsx +2 -2
  243. package/template/app/[lang]/(home)/components/one-two-section.tsx +1 -3
  244. package/template/app/[lang]/(home)/components/templates.tsx +3 -5
  245. package/template/app/[lang]/(home)/components/text-grid-section.tsx +1 -1
  246. package/template/app/[lang]/(home)/layout.tsx +4 -3
  247. package/template/app/[lang]/(home)/page.tsx +2 -2
  248. package/template/app/[lang]/agents.md/route.ts +6 -0
  249. package/template/app/[lang]/docs/[[...slug]]/page.tsx +4 -1
  250. package/template/app/[lang]/layout.tsx +6 -6
  251. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +1 -1
  252. package/template/app/[lang]/llms.txt/route.ts +1 -1
  253. package/template/app/[lang]/sitemap.md/route.ts +2 -2
  254. package/template/app/api/chat/route.ts +12 -1
  255. package/template/app/api/search/route.ts +2 -2
  256. package/template/app/styles/geistdocs.css +150 -109
  257. package/template/components/ui/badge.tsx +5 -5
  258. package/template/components/ui/button.tsx +7 -7
  259. package/template/components/ui/command-prompt.tsx +2 -2
  260. package/template/content/docs/agent-readiness.mdx +103 -0
  261. package/template/content/docs/ask-ai.mdx +57 -5
  262. package/template/content/docs/configuration.cn.mdx +47 -7
  263. package/template/content/docs/configuration.mdx +158 -1
  264. package/template/content/docs/deployment.mdx +11 -0
  265. package/template/content/docs/edit-on-github.mdx +2 -2
  266. package/template/content/docs/env.mdx +36 -5
  267. package/template/content/docs/feedback.mdx +2 -2
  268. package/template/content/docs/getting-started.cn.mdx +2 -2
  269. package/template/content/docs/getting-started.mdx +8 -1
  270. package/template/content/docs/index.cn.mdx +36 -33
  271. package/template/content/docs/index.mdx +12 -0
  272. package/template/content/docs/internationalization.mdx +1 -1
  273. package/template/content/docs/llms-txt.cn.mdx +24 -2
  274. package/template/content/docs/llms-txt.mdx +44 -12
  275. package/template/content/docs/md.cn.mdx +12 -15
  276. package/template/content/docs/md.mdx +26 -16
  277. package/template/content/docs/meta.json +4 -0
  278. package/template/content/docs/migration.mdx +364 -0
  279. package/template/content/docs/open-in-chat.mdx +8 -10
  280. package/template/content/docs/provider.cn.mdx +6 -5
  281. package/template/content/docs/provider.mdx +9 -8
  282. package/template/content/docs/proxy.cn.mdx +96 -0
  283. package/template/content/docs/proxy.mdx +178 -0
  284. package/template/content/docs/rss.mdx +2 -2
  285. package/template/content/docs/syntax.mdx +1 -1
  286. package/template/content/docs/theme-aware-image.mdx +1 -1
  287. package/template/content/docs/versioned-docs.cn.mdx +117 -0
  288. package/template/content/docs/versioned-docs.mdx +228 -0
  289. package/template/geistdocs.tsx +26 -0
  290. package/template/lib/geistdocs/config.tsx +3 -0
  291. package/template/package.json +5 -5
  292. package/template/proxy.ts +2 -1
  293. package/template/source.config.ts +8 -47
  294. package/template/app/actions/feedback/emotions.ts +0 -18
  295. package/template/app/actions/feedback/index.ts +0 -45
  296. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +0 -35
  297. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +0 -27
  298. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +0 -27
  299. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +0 -30
  300. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +0 -27
  301. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +0 -27
  302. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +0 -25
  303. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +0 -27
  304. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +0 -36
  305. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +0 -29
  306. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +0 -38
  307. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +0 -42
  308. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +0 -42
  309. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +0 -31
  310. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +0 -29
  311. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +0 -24
  312. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +0 -73
  313. package/template/components/geistdocs/callout.tsx +0 -40
  314. package/template/components/geistdocs/chat.tsx +0 -24
  315. package/template/components/geistdocs/code-block-tabs.tsx +0 -61
  316. package/template/components/geistdocs/code-block.tsx +0 -134
  317. package/template/components/geistdocs/copy-page.tsx +0 -27
  318. package/template/components/geistdocs/desktop-menu.tsx +0 -52
  319. package/template/components/geistdocs/docs-page.tsx +0 -35
  320. package/template/components/geistdocs/edit-source.tsx +0 -30
  321. package/template/components/geistdocs/feedback.tsx +0 -139
  322. package/template/components/geistdocs/footer.tsx +0 -30
  323. package/template/components/geistdocs/github-button.tsx +0 -19
  324. package/template/components/geistdocs/home-layout.tsx +0 -46
  325. package/template/components/geistdocs/icons.tsx +0 -13
  326. package/template/components/geistdocs/installer.tsx +0 -58
  327. package/template/components/geistdocs/language-selector.tsx +0 -3
  328. package/template/components/geistdocs/mermaid.tsx +0 -68
  329. package/template/components/geistdocs/mobile-docs-bar.tsx +0 -77
  330. package/template/components/geistdocs/mobile-menu.tsx +0 -150
  331. package/template/components/geistdocs/navbar-logo.tsx +0 -124
  332. package/template/components/geistdocs/navbar.tsx +0 -22
  333. package/template/components/geistdocs/rss-button.tsx +0 -10
  334. package/template/components/geistdocs/scroll-top.tsx +0 -21
  335. package/template/components/geistdocs/search.tsx +0 -17
  336. package/template/components/geistdocs/sidebar.tsx +0 -128
  337. package/template/components/geistdocs/theme-aware-image.tsx +0 -22
  338. package/template/components/geistdocs/theme-toggle.tsx +0 -3
  339. package/template/components/geistdocs/video.tsx +0 -16
  340. package/template/components/ui/button-group.tsx +0 -83
  341. package/template/components/ui/card.tsx +0 -92
  342. package/template/components/ui/collapsible.tsx +0 -33
  343. package/template/components/ui/command.tsx +0 -184
  344. package/template/components/ui/dialog.tsx +0 -143
  345. package/template/components/ui/drawer.tsx +0 -135
  346. package/template/components/ui/dropdown-menu.tsx +0 -257
  347. package/template/components/ui/hover-card.tsx +0 -44
  348. package/template/components/ui/input-group.tsx +0 -170
  349. package/template/components/ui/input.tsx +0 -21
  350. package/template/components/ui/kbd.tsx +0 -28
  351. package/template/components/ui/navigation-menu.tsx +0 -192
  352. package/template/components/ui/popover.tsx +0 -48
  353. package/template/components/ui/scroll-area.tsx +0 -58
  354. package/template/components/ui/select.tsx +0 -187
  355. package/template/components/ui/separator.tsx +0 -28
  356. package/template/components/ui/sheet.tsx +0 -139
  357. package/template/components/ui/sonner.tsx +0 -40
  358. package/template/components/ui/spinner.tsx +0 -16
  359. package/template/components/ui/textarea.tsx +0 -18
  360. package/template/components/ui/tooltip.tsx +0 -61
  361. package/template/hooks/geistdocs/use-sidebar.ts +0 -13
  362. package/template/hooks/use-mobile.ts +0 -19
@@ -1,22 +1,34 @@
1
1
  ---
2
2
  title: 配置
3
- description: 在不修改源文件的情况下自定义您的 Geistdocs 站点
3
+ description: 通过本地 adapter 文件和包 API 配置 Geistdocs 站点
4
4
  type: reference
5
- summary: 通过 geistdocs.tsx 配置文件自定义您的 Geistdocs 站点,无需修改源代码。
5
+ summary: 配置站点 metadata、导航、AI 功能、页面操作、翻译和本地 adapters。
6
6
  prerequisites:
7
7
  - /docs/getting-started
8
8
  related:
9
9
  - /docs/provider
10
10
  - /docs/env
11
+ - /docs/versioned-docs
12
+ - /docs/proxy
11
13
  ---
12
14
 
13
- 虽然 Geistdocs 完全开源、可组合且可复制粘贴,但最好在不修改源代码的情况下自定义您的站点。这样可以在保留自定义内容的同时,更容易在未来更新 Geistdocs。
14
-
15
- 为此,Geistdocs 使用一个根级配置文件,让您可以在不接触源代码的情况下自定义文档站点。
15
+ 通过生成项目中你拥有的文件配置 Geistdocs。运行时功能来自 `@vercel/geistdocs`,本地文件控制内容、品牌、路由 adapters 和可选自定义。
16
16
 
17
17
  ## 配置文件
18
18
 
19
- 项目根目录下的 `geistdocs.tsx` 文件包含所有自定义选项:
19
+ | File | Purpose |
20
+ | --- | --- |
21
+ | `geistdocs.tsx` | 站点级设置,包括 logo、nav、GitHub 仓库、AI prompt、翻译和功能开关。 |
22
+ | `lib/geistdocs/config.tsx` | 使用 `defineConfig` 将 `geistdocs.tsx` exports 转换为包配置。 |
23
+ | `lib/geistdocs/source.ts` | 将 Fumadocs content collections 连接到包 source adapter。 |
24
+ | `components/geistdocs/mdx-components.tsx` | 添加或覆盖 MDX 组件。 |
25
+ | `app/[lang]/docs/[[...slug]]/page.tsx` | 配置包提供的 docs page renderer。 |
26
+ | `proxy.ts` | 配置 Markdown 协商、AI-agent 重写、请求追踪和自定义 request hooks。 |
27
+ | `content/docs/meta.json` | 控制侧边栏顺序和分组标签。 |
28
+
29
+ ## `geistdocs.tsx`
30
+
31
+ 项目根目录下的 `geistdocs.tsx` 文件包含主要自定义选项:
20
32
 
21
33
  ```tsx title="geistdocs.tsx"
22
34
  import { BookHeartIcon } from "lucide-react";
@@ -112,4 +124,32 @@ export const title = "Your Product Documentation";
112
124
  ```tsx title="geistdocs.tsx"
113
125
  export const prompt =
114
126
  "You are a helpful assistant specializing in answering questions about Your Product, a platform for building amazing applications.";
115
- ```
127
+ ```
128
+
129
+ ## 高级配置
130
+
131
+ `lib/geistdocs/config.tsx` 可以添加 `content` 和 `versions` metadata,让本地 adapters 和自定义 UI 共用同一个配置对象:
132
+
133
+ ```tsx title="lib/geistdocs/config.tsx"
134
+ export const config = defineConfig({
135
+ // ...
136
+ content: [
137
+ { id: "docs", label: "Docs", dir: "content/docs", route: "/docs" },
138
+ {
139
+ id: "cookbook",
140
+ label: "Cookbook",
141
+ dir: "content/cookbook",
142
+ route: "/cookbook",
143
+ },
144
+ ],
145
+ versions: {
146
+ current: "v6",
147
+ items: [
148
+ { id: "v6", label: "v6 latest" },
149
+ { id: "v5", label: "v5", href: "https://v5.example.com/:path*" },
150
+ ],
151
+ },
152
+ });
153
+ ```
154
+
155
+ 阅读 [版本化文档](/docs/versioned-docs) 配置 versioned sources,阅读 [Proxy 和 Markdown 路由](/docs/proxy) 配置 route mappings。
@@ -6,8 +6,11 @@ summary: Configure site metadata, navigation, AI features, page actions, transla
6
6
  prerequisites:
7
7
  - /docs/getting-started
8
8
  related:
9
+ - /docs/migration
9
10
  - /docs/provider
10
11
  - /docs/env
12
+ - /docs/versioned-docs
13
+ - /docs/proxy
11
14
  ---
12
15
 
13
16
  Configure Geistdocs through user-owned files in the generated project. Runtime features come from `@vercel/geistdocs`, while your local files control content, branding, routing adapters, and opt-in customization.
@@ -20,11 +23,18 @@ Configure Geistdocs through user-owned files in the generated project. Runtime f
20
23
 
21
24
  | File | Purpose |
22
25
  | --- | --- |
23
- | `geistdocs.tsx` | Site-level settings, including logo, nav, GitHub repo, AI prompt, translations, and feature flags. |
26
+ | `geistdocs.tsx` | Site-level settings, including logo, nav, GitHub repo, AI prompt, agent-readiness metadata, translations, and feature flags. |
27
+ | `source.config.ts` | Configures Fumadocs collections with the package-provided schema, Markdown plugins, and syntax theme. |
24
28
  | `lib/geistdocs/config.tsx` | Converts `geistdocs.tsx` exports into the package config using `defineConfig`. |
29
+ | `source.config.ts` | Configures Fumadocs collections with package-safe schemas and Markdown processing. |
25
30
  | `lib/geistdocs/source.ts` | Connects Fumadocs content collections to the package source adapter. |
26
31
  | `components/geistdocs/mdx-components.tsx` | Adds or overrides MDX components. |
32
+ | `components/geistdocs/docs-layout.tsx` | Customizes the package-backed docs layout, including optional sidebar content. |
27
33
  | `app/[lang]/docs/[[...slug]]/page.tsx` | Configures the package docs page renderer. |
34
+ | `app/[lang]/agents.md/route.ts` | Configures the agent-readiness entry point. |
35
+ | `app/[lang]/llms.txt/route.ts` | Configures the all-docs Markdown endpoint. |
36
+ | `app/[lang]/llms.mdx/[[...slug]]/route.ts` | Configures single-page Markdown responses. |
37
+ | `proxy.ts` | Configures markdown negotiation, AI-agent rewrites, request tracking, and custom request hooks. |
28
38
  | `content/docs/meta.json` | Controls sidebar order and section labels. |
29
39
 
30
40
  ## `geistdocs.tsx`
@@ -37,6 +47,8 @@ export const Logo = () => <span>My Docs</span>;
37
47
  export const github = {
38
48
  owner: "my-org",
39
49
  repo: "my-repo",
50
+ branch: "main",
51
+ editPath: "content/docs/{path}",
40
52
  };
41
53
 
42
54
  export const nav = [
@@ -54,6 +66,13 @@ export const suggestions = [
54
66
  "How do I deploy?",
55
67
  ];
56
68
 
69
+ export const agent = {
70
+ product: {
71
+ name: "My Product",
72
+ description: "My Product helps teams build and deploy applications.",
73
+ },
74
+ };
75
+
57
76
  export const translations = {
58
77
  en: { displayName: "English" },
59
78
  };
@@ -62,6 +81,98 @@ export const basePath: string | undefined = undefined;
62
81
  export const siteId: string | undefined = undefined;
63
82
  ```
64
83
 
84
+ ## `defineConfig`
85
+
86
+ `lib/geistdocs/config.tsx` converts your root exports into a package config. Most projects only need the generated defaults:
87
+
88
+ ```tsx title="lib/geistdocs/config.tsx"
89
+ import { defineConfig } from "@vercel/geistdocs/config";
90
+ import {
91
+ agent,
92
+ basePath,
93
+ github,
94
+ Logo,
95
+ nav,
96
+ prompt,
97
+ siteId,
98
+ suggestions,
99
+ title,
100
+ translations,
101
+ } from "@/geistdocs";
102
+
103
+ export const config = defineConfig({
104
+ title,
105
+ agent,
106
+ defaultLanguage: "en",
107
+ logo: <Logo />,
108
+ github,
109
+ nav,
110
+ basePath,
111
+ siteId,
112
+ translations,
113
+ ai: {
114
+ prompt,
115
+ suggestions,
116
+ },
117
+ });
118
+ ```
119
+
120
+ Advanced sites can add `content` and `versions` metadata so local adapters and custom UI share one configuration object:
121
+
122
+ ```tsx title="lib/geistdocs/config.tsx"
123
+ export const config = defineConfig({
124
+ // ...
125
+ content: [
126
+ { id: "docs", label: "Docs", dir: "content/docs", route: "/docs" },
127
+ {
128
+ id: "cookbook",
129
+ label: "Cookbook",
130
+ dir: "content/cookbook",
131
+ route: "/cookbook",
132
+ },
133
+ ],
134
+ versions: {
135
+ current: "v6",
136
+ items: [
137
+ { id: "v6", label: "v6 latest" },
138
+ { id: "v5", label: "v5", href: "https://v5.example.com/:path*" },
139
+ ],
140
+ },
141
+ });
142
+ ```
143
+
144
+ Use [Versioned docs](/docs/versioned-docs) for versioned source setup and [Proxy and markdown routes](/docs/proxy) for route mappings.
145
+
146
+ ## `source.config.ts`
147
+
148
+ Use the source-config-safe package export in `source.config.ts`. This file is evaluated by `fumadocs-mdx` during install and build, so it should avoid imports from runtime component entry points such as `@vercel/geistdocs/mdx`.
149
+
150
+ ```ts title="source.config.ts"
151
+ import {
152
+ defineGeistdocsSourceConfig,
153
+ geistdocsFrontmatterSchema,
154
+ geistdocsMetaSchema,
155
+ } from "@vercel/geistdocs/source-config";
156
+ import { defineDocs } from "fumadocs-mdx/config";
157
+
158
+ export const docs = defineDocs({
159
+ dir: "content/docs",
160
+ docs: {
161
+ schema: geistdocsFrontmatterSchema,
162
+ postprocess: {
163
+ includeProcessedMarkdown: true,
164
+ },
165
+ },
166
+ meta: {
167
+ schema: geistdocsMetaSchema,
168
+ },
169
+ });
170
+
171
+ export default defineGeistdocsSourceConfig();
172
+ ```
173
+
174
+ To serve docs from the site root, use `route: "/"` in `content` and `baseUrl: "/"` in `createSource`. Root-mounted docs need explicit `markdownRoutes`; Geistdocs does not infer a broad `/*path` mapping because it can capture homepages and non-docs app routes.
175
+
65
176
  ## Page actions
66
177
 
67
178
  Page actions appear below the table of contents. They are enabled by default and can be disabled through `defineConfig` in `lib/geistdocs/config.tsx`:
@@ -82,6 +193,33 @@ export const config = defineConfig({
82
193
  });
83
194
  ```
84
195
 
196
+ `github.editPath` controls the file path used by the "Edit this page on GitHub" action. Use `{path}` where the page path should be inserted. For monorepos, include the app directory, such as `apps/docs/content/docs/{path}`.
197
+
198
+ ## Page visibility
199
+
200
+ Use frontmatter to control whether a page appears in package-owned machine-readable surfaces:
201
+
202
+ ```mdx title="content/docs/internal-note.mdx"
203
+ ---
204
+ title: Internal note
205
+ description: Hidden from public indexes
206
+ internal: true
207
+ ---
208
+ ```
209
+
210
+ `internal: true` excludes a page from `llms.txt`, `sitemap.md`, search, and chat. `noindex: true` adds `robots: noindex` metadata and excludes the page from `sitemap.md`. Use `excludeFrom` for per-surface control:
211
+
212
+ ```mdx
213
+ ---
214
+ title: Draft guide
215
+ excludeFrom:
216
+ - chat
217
+ - search
218
+ ---
219
+ ```
220
+
221
+ Optional `tags`, `keywords`, and `canonical` frontmatter are also recognized by the package runtime.
222
+
85
223
  ## User-owned adapters
86
224
 
87
225
  Adapter files are safe to edit. Package updates do not overwrite them.
@@ -107,6 +245,25 @@ Then use it in MDX:
107
245
  <ProductCard name="My product" />
108
246
  ```
109
247
 
248
+ ## Docs page adapter
249
+
250
+ `createDocsPage` accepts hooks for route-specific behavior:
251
+
252
+ ```tsx title="app/[lang]/docs/[[...slug]]/page.tsx"
253
+ const docsPage = createDocsPage({
254
+ config,
255
+ source: geistdocsSource,
256
+ getPageUrl: ({ page }) => page.url,
257
+ openGraph: {
258
+ images: true,
259
+ },
260
+ metadata: ({ metadata }) => metadata,
261
+ mdx: ({ link }) => getMDXComponents({ a: link }),
262
+ });
263
+ ```
264
+
265
+ Use `getPageUrl` when the public route differs from the source URL, such as `/v5/docs`. Set `openGraph.images` to `true` only when your site includes the Geistdocs OG route. Use `metadata` to set canonical URLs, `robots`, or custom Open Graph fields for a specific route.
266
+
110
267
  ## Package-owned runtime
111
268
 
112
269
  Do not edit files inside `node_modules/@vercel/geistdocs`. Update the package instead:
@@ -38,3 +38,14 @@ To deploy from the Vercel dashboard:
38
38
  - **Install Command**: `pnpm install` or `npm install`
39
39
  4. Add your environment variables (see [Environment Variables](/docs/env))
40
40
  5. Click "Deploy"
41
+
42
+ ## Deploy with Vertex-backed Ask AI
43
+
44
+ If your site routes Ask AI through the central Vertex-backed proxy, configure both the Geistdocs site and the Vertex deployment before testing production chat.
45
+
46
+ 1. Set `GEISTDOCS_CHAT_PROXY_URL` on the Geistdocs site to the platform proxy URL, including `/vertex`.
47
+ 2. Leave `GEISTDOCS_CHAT_PROXY_TOKEN` unset unless your proxy requires bearer authentication.
48
+ 3. Add the Geistdocs platform Vercel project as a Trusted Source in the Vertex deployment's Deployment Protection settings.
49
+ 4. Confirm the platform proxy can forward the Vercel OIDC token to Vertex in `x-vercel-trusted-oidc-idp-token`.
50
+
51
+ The Geistdocs site does not need Vertex credentials. The platform proxy authenticates to Vertex with Vercel OIDC and Trusted Sources.
@@ -7,13 +7,13 @@ related:
7
7
  - /docs/configuration
8
8
  ---
9
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.
10
+ The "Edit on GitHub" feature gives readers a direct link to propose documentation changes. This link appears in the table of contents sidebar on every documentation page.
11
11
 
12
12
  <CopyPrompt text="Help me configure Edit on GitHub for this Geistdocs site. Check the github owner and repo in geistdocs.tsx, verify the generated edit URL for this page, and tell me how to disable the action if needed.">
13
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
14
  </CopyPrompt>
15
15
 
16
- ## How It Works
16
+ ## How it works
17
17
 
18
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
19
 
@@ -2,7 +2,7 @@
2
2
  title: Environment Variables
3
3
  description: Learn about the environment variables used in Geistdocs
4
4
  type: reference
5
- summary: Environment variables required by Geistdocs for AI chat and production URL configuration.
5
+ summary: Environment variables required by Geistdocs for AI chat, proxy mode, and production URL configuration.
6
6
  prerequisites:
7
7
  - /docs/getting-started
8
8
  related:
@@ -10,18 +10,49 @@ related:
10
10
  - /docs/deployment
11
11
  ---
12
12
 
13
- Geistdocs has functionality that requires specific environment variables to be set.
13
+ Geistdocs uses environment variables to configure Ask AI, optional Vertex-backed proxy mode, and production URL behavior.
14
14
 
15
- <CopyPrompt text="Review this Geistdocs project and help me configure the required environment variables. Check whether AI_GATEWAY_API_KEY and NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL are needed for the features I enabled, then tell me where to set them locally and on Vercel.">
16
- Review this Geistdocs project and help me configure the required environment variables. Check whether `AI_GATEWAY_API_KEY` and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` are needed for the features I enabled, then tell me where to set them locally and on Vercel.
15
+ <CopyPrompt text="Review this Geistdocs project and help me configure the required environment variables. Check whether AI_GATEWAY_API_KEY, GEISTDOCS_CHAT_PROXY_URL, and NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL are needed for the features I enabled, then tell me where to set them locally and on Vercel.">
16
+ Review this Geistdocs project and help me configure the required environment variables. Check whether `AI_GATEWAY_API_KEY`, `GEISTDOCS_CHAT_PROXY_URL`, and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` are needed for the features I enabled, then tell me where to set them locally and on Vercel.
17
17
  </CopyPrompt>
18
18
 
19
19
  ## `AI_GATEWAY_API_KEY`
20
20
 
21
- The API key for the AI gateway. This is used to power the AI chat functionality.
21
+ The API key for the AI Gateway. This is used to power the default local AI chat functionality when `GEISTDOCS_CHAT_PROXY_URL` is not set.
22
22
 
23
23
  <Callout>This is automatically set when deploying to Vercel.</Callout>
24
24
 
25
+ Leave `GEISTDOCS_CHAT_PROXY_URL` unset to use AI Gateway mode.
26
+
27
+ ## `GEISTDOCS_CHAT_PROXY_URL`
28
+
29
+ An optional URL for a chat proxy. When set, Geistdocs searches the local documentation on the first user message, injects the current page and related docs as context, and forwards the request to this proxy.
30
+
31
+ Use this when routing Ask AI through a central Vertex-backed service. The value should point at the Geistdocs platform proxy and include `/vertex`:
32
+
33
+ ```txt
34
+ https://<geistdocs-platform-deployment>/vertex
35
+ ```
36
+
37
+ When this variable is set, the site does not need `AI_GATEWAY_API_KEY` for Ask AI requests. The platform proxy calls Vertex and forwards a Vercel OIDC token in `x-vercel-trusted-oidc-idp-token` so the Vertex deployment can validate the caller through Deployment Protection Trusted Sources.
38
+
39
+ ## `GEISTDOCS_CHAT_PROXY_TOKEN`
40
+
41
+ An optional bearer token for the chat proxy. Only set this if your proxy requires an `Authorization` header.
42
+
43
+ The default Geistdocs platform `/vertex` proxy uses Vercel OIDC and Trusted Sources, so it does not require this token.
44
+
45
+ ## Vertex-backed proxy setup
46
+
47
+ To route Ask AI through Vertex:
48
+
49
+ 1. Use or deploy the central Geistdocs platform proxy with its `/vertex` route.
50
+ 2. In the Vertex deployment's Deployment Protection settings, add the Geistdocs platform Vercel project as a Trusted Source.
51
+ 3. In each Geistdocs site that should use Vertex, set `GEISTDOCS_CHAT_PROXY_URL` to the platform proxy URL, including `/vertex`.
52
+ 4. Leave `GEISTDOCS_CHAT_PROXY_TOKEN` unset unless you replace the platform proxy with a custom bearer-authenticated proxy.
53
+
54
+ The Vertex deployment does not need a Geistdocs-specific environment variable. Access is controlled by Trusted Sources and the OIDC token forwarded by the platform proxy.
55
+
25
56
  ## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`
26
57
 
27
58
  The production URL of the Geistdocs site. This is automatically set when deploying to Vercel.
@@ -10,13 +10,13 @@ related:
10
10
  - /docs/configuration
11
11
  ---
12
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.
13
+ The Feedback feature lets readers share page-level feedback through an interactive widget. Feedback is posted to a centralized GitHub repository as issues so your team can track, label, and respond to user input.
14
14
 
15
15
  <CopyPrompt text="Help me configure feedback for this Geistdocs project. Check whether feedback is enabled, what siteId label is used, and how feedback is sent to the Geistdocs platform and GitHub issues.">
16
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
17
  </CopyPrompt>
18
18
 
19
- ## How It Works
19
+ ## How it works
20
20
 
21
21
  The feedback widget appears in the table of contents sidebar on every documentation page. When users click "Give feedback", they can:
22
22
 
@@ -64,7 +64,7 @@ description: 这是我的第一个文档页面
64
64
 
65
65
  # My First Page
66
66
 
67
- Welcome to my documentation! This page will be available at `/docs/my-first-page`.
67
+ Welcome to my documentation! Find this page at `/docs/my-first-page`.
68
68
 
69
69
  ## Features
70
70
 
@@ -83,4 +83,4 @@ console.log(greeting("World"));
83
83
  ```
84
84
  ````
85
85
 
86
- 在 [语法](/docs/syntax) 部分了解有关可用语法的更多信息。
86
+ 在 [语法](/docs/syntax) 部分了解有关可用语法的更多信息。
@@ -5,11 +5,12 @@ type: guide
5
5
  summary: Create a Geistdocs project, run it locally, and edit your first documentation page.
6
6
  related:
7
7
  - /docs/configuration
8
+ - /docs/migration
8
9
  - /docs/syntax
9
10
  - /docs/deployment
10
11
  ---
11
12
 
12
- Create a Geistdocs site with the package CLI, then edit the generated content and configuration files. The generated project includes these docs so you can use them as a reference while you build.
13
+ Create a Geistdocs site with the package CLI, then edit the generated content and configuration files. If you already have a Fumadocs or custom Geist docs site, read [Migration guide](/docs/migration) before moving route adapters and middleware behavior.
13
14
 
14
15
  <CopyPrompt text="Create a Geistdocs project with pnpm dlx @vercel/geistdocs init --name my-docs. Then open my-docs, run pnpm dev, and explain which files I should edit first: geistdocs.tsx, content/docs, content/docs/meta.json, and components/geistdocs/mdx-components.tsx.">
15
16
  Create a Geistdocs project with `pnpm dlx @vercel/geistdocs init --name my-docs`. Then open `my-docs`, run `pnpm dev`, and explain which files I should edit first: `geistdocs.tsx`, `content/docs`, `content/docs/meta.json`, and `components/geistdocs/mdx-components.tsx`.
@@ -39,6 +40,12 @@ npx @vercel/geistdocs init --name my-docs
39
40
 
40
41
  The CLI copies the template bundled in the package, rewrites the generated app to depend on the same `@vercel/geistdocs` version, installs dependencies, copies `.env.example` to `.env.local`, and initializes Git.
41
42
 
43
+ ## Understand generated dependencies
44
+
45
+ Generated projects include `@vercel/geistdocs`, `ai` v6, and `@ai-sdk/react` v3. Geistdocs uses those AI SDK packages for Ask AI, including the chat client transport and `createChatRoute` server behavior.
46
+
47
+ Update Ask AI by updating `@vercel/geistdocs`, not by copying package chat internals into the app. If your project uses the AI SDK directly for separate product features, keep that code compatible with the app's installed AI SDK version; package-owned Ask AI does not need to match another consumer project's `ai` version.
48
+
42
49
  ## Start the development server
43
50
 
44
51
  Open the generated project and start Next.js:
@@ -1,54 +1,57 @@
1
1
  ---
2
2
  title: 概述
3
- description: 用于快速且一致地搭建 Vercel 文档微站点的现代文档模板
3
+ description: 了解 Geistdocs 如何将 CLI、运行时和模板打包为文档站点
4
4
  type: overview
5
- summary: 基于 Next.js 和 Fumadocs 构建的生产就绪文档模板,用于创建一致的文档微站点。
5
+ summary: Geistdocs 是一个打包的文档系统,用于创建带共享运行时功能的 Next.js 和 Fumadocs 站点。
6
6
  related:
7
7
  - /docs/getting-started
8
8
  - /docs/configuration
9
9
  ---
10
10
 
11
- Geistdocs 是一个生产就绪的文档模板,基于 Next.js 16 和 Fumadocs 构建。它被设计为 Vercel 的内部模板,用于在各个项目中创建具有一致外观、体验和功能集的文档微站点。
11
+ Geistdocs 是一个基于 Next.js、Fumadocs 和 Vercel 文档模式的打包文档系统。使用它创建一个本地保存内容、运行时由包管理的文档站点。
12
12
 
13
- ## 概述
13
+ ## Geistdocs 的工作方式
14
14
 
15
- 该模板提供了构建美观且功能齐全的文档站点所需的一切,且只需最少的设置。它将用于内容创作的 MDX 的强大功能与诸如 AI 驱动的聊天、GitHub Discussions 集成和高级搜索功能等现代特性相结合。
16
-
17
- ## 使用场景
18
-
19
- 该模板非常适合:
15
+ Geistdocs 由三部分组成:
20
16
 
21
- - **产品文档** - 功能指南、教程和参考
22
- - **API 文档** - 带代码示例的接口文档
23
- - **开发者工具** - CLI 工具、SDK 和框架文档
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
- Geistdocs 由三部分组成:
23
+ 大多数项目从这些文件开始:
30
24
 
31
- - `template` - 你将用来创建文档站点的模板。
32
- - `platform` - 你的文档站点将用于处理反馈和翻译的后端。
33
- - `cli` - 用于创建和管理文档站点的 CLI。
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
- ```mermaid
36
- graph TD
37
- root[geistdocs/]
32
+ ## 包负责的内容
38
33
 
39
- root --> apps[apps/]
40
- root --> packages[packages/]
34
+ 包负责文档渲染、页面操作、搜索、Ask AI、Markdown 路由、`llms.txt` 和可复用 MDX 组件等共享行为。更新 `@vercel/geistdocs` 可以获得包级别修复和功能,而不会覆盖你拥有的 adapter 文件。
41
35
 
42
- apps --> template[template/]
43
- apps --> platform[platform/]
36
+ 高级项目可以使用包 API 配置版本化文档、多个内容 source、自定义页面 metadata 和自定义 proxy hooks。
44
37
 
45
- packages --> cli[cli]
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
- - 使用 AI 聊天助手提问
54
+ - 阅读 [Getting Started](/docs/getting-started) 创建并运行项目。
55
+ - 阅读 [Configuration](/docs/configuration) 自定义生成的站点。
56
+ - 阅读 [版本化文档](/docs/versioned-docs) 配置多个文档版本。
57
+ - 阅读 [Proxy 和 Markdown 路由](/docs/proxy) 添加自定义请求逻辑。
@@ -5,6 +5,7 @@ type: overview
5
5
  summary: Geistdocs is a packaged documentation system for creating Next.js and Fumadocs sites with shared runtime features.
6
6
  related:
7
7
  - /docs/getting-started
8
+ - /docs/migration
8
9
  - /docs/configuration
9
10
  ---
10
11
 
@@ -60,19 +61,27 @@ Most projects start by editing these files:
60
61
  - `geistdocs.tsx`: Configure the logo, nav, GitHub repo, title, AI prompt, translations, and feature flags.
61
62
  - `components/geistdocs/mdx-components.tsx`: Add or override MDX components.
62
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.
63
65
 
64
66
  ## What the package owns
65
67
 
66
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.
67
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
+
68
74
  ## Included features
69
75
 
70
76
  - MDX documentation with custom components
71
77
  - Local content in `content/docs`
72
78
  - Search and Ask AI
73
79
  - Page actions, including feedback, copy page, open in chat, and edit on GitHub
80
+ - Agent-readiness metadata with `/agents.md`
74
81
  - Raw Markdown routes for AI tools
75
82
  - `llms.txt`
83
+ - Versioned docs and multiple content sources
84
+ - Proxy hooks for custom request logic
76
85
  - RSS feed
77
86
  - Theme-aware images
78
87
  - Internationalized routes
@@ -81,5 +90,8 @@ The package owns shared behavior such as docs rendering, page actions, search, A
81
90
  ## Next steps
82
91
 
83
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.
84
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.
85
97
  - Read [Syntax](/docs/syntax) to write content with MDX components.
@@ -15,7 +15,7 @@ Geistdocs supports internationalization (i18n) out of the box using Fumadocs' la
15
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
16
  </CopyPrompt>
17
17
 
18
- ## How It Works
18
+ ## How it works
19
19
 
20
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:
21
21
 
@@ -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/plain` 返回
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/) 了解更多。