@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
@@ -9,19 +9,20 @@ related:
9
9
  - /docs/configuration
10
10
  ---
11
11
 
12
- The `GeistdocsProvider` is a wrapper component that sits at the root of your application. It wraps Fumadocs' `RootProvider` and adds Geistdocs-specific functionality to make everything work seamlessly.
12
+ The `GeistdocsProvider` wraps the root of your application with package-managed UI state. It connects theme, search, AI chat, notifications, and optional analytics to the rest of your Geistdocs site.
13
13
 
14
14
  <CopyPrompt text="Review my Geistdocs provider setup. Check that the root layout wraps the app with GeistdocsProvider, that config is passed correctly, and that analytics, search, theme, and Ask AI behavior are wired safely.">
15
15
  Review my Geistdocs provider setup. Check that the root layout wraps the app with `GeistdocsProvider`, that config is passed correctly, and that analytics, search, theme, and Ask AI behavior are wired safely.
16
16
  </CopyPrompt>
17
17
 
18
- ## What It Does
18
+ ## What it does
19
19
 
20
- The provider handles these main things for you:
20
+ The provider handles these behaviors:
21
21
 
22
- 2. **Toast Notifications** - Provides a global notification system for user feedback
23
- 3. **Analytics** - Integrates Vercel Analytics for tracking page views and performance
24
- 4. **Search** - Configures the search dialog and connects it to your search API
22
+ 1. **Toast notifications**: Provides a global notification system for user feedback.
23
+ 2. **Analytics**: Integrates Vercel Analytics and Speed Insights when the local adapter includes them.
24
+ 3. **Search**: Configures the search dialog and connects it to your search API.
25
+ 4. **Ask AI**: Provides the client state used by the chat sidebar and page actions.
25
26
 
26
27
  ## Usage
27
28
 
@@ -42,13 +43,13 @@ const Layout = ({ children }: LayoutProps) => (
42
43
  );
43
44
  ```
44
45
 
45
- That's it. The provider handles everything automatically.
46
+ The generated local adapter imports the package provider and passes your site config to it.
46
47
 
47
48
  ## AI Sidebar
48
49
 
49
50
  When users open the AI chat on desktop, the provider automatically adds padding to prevent content from being hidden behind the sidebar. On mobile, the chat opens as a drawer instead, so no padding is needed.
50
51
 
51
- You don't need to do anything - the provider detects the screen size and chat state automatically.
52
+ The provider detects the screen size and chat state.
52
53
 
53
54
  ## Toast Notifications
54
55
 
@@ -0,0 +1,96 @@
1
+ ---
2
+ title: Proxy 和 Markdown 路由
3
+ description: 在保留包内 Markdown 协商逻辑的同时添加自定义请求逻辑
4
+ type: reference
5
+ summary: 使用 createProxy 的 before 和 after hooks、markdownRoutes 和静态 Next.js matcher 配置代理。
6
+ prerequisites:
7
+ - /docs/configuration
8
+ related:
9
+ - /docs/md
10
+ - /docs/llms-txt
11
+ - /docs/versioned-docs
12
+ ---
13
+
14
+ Geistdocs proxy 负责 Markdown 协商、AI agent 重写、请求追踪和 i18n fallback。使用 hooks 添加站点特有的请求逻辑,而不是复制包内实现。
15
+
16
+ ## 基础 proxy
17
+
18
+ 生成的项目使用 `createProxy` 和默认的 `/docs` Markdown 路由:
19
+
20
+ ```ts title="proxy.ts"
21
+ import { createProxy } from "@vercel/geistdocs/proxy";
22
+ import { config as geistdocsConfig } from "@/lib/geistdocs/config";
23
+ import { trackMdRequest } from "@/lib/geistdocs/md-tracking";
24
+
25
+ const proxy = createProxy({
26
+ config: geistdocsConfig,
27
+ trackMarkdownRequest: trackMdRequest,
28
+ });
29
+
30
+ export const config = {
31
+ matcher: [
32
+ "/((?!api(?:/|$)|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
33
+ ],
34
+ };
35
+
36
+ export default proxy;
37
+ ```
38
+
39
+ `export const config` 必须保持为静态对象。Next.js 会在构建时读取 proxy matcher,不支持在该导出中调用 helper。
40
+
41
+ ## 自定义请求逻辑
42
+
43
+ 使用 `before` 在 Geistdocs Markdown 处理之前运行逻辑。返回 `Response` 会停止后续处理。
44
+
45
+ ```ts title="proxy.ts"
46
+ import { createProxy } from "@vercel/geistdocs/proxy";
47
+ import { NextResponse } from "next/server";
48
+ import { config as geistdocsConfig } from "@/lib/geistdocs/config";
49
+
50
+ const proxy = createProxy({
51
+ config: geistdocsConfig,
52
+ before: async ({ request, defaultLanguage }) => {
53
+ if (request.nextUrl.pathname === "/") {
54
+ return NextResponse.rewrite(
55
+ new URL(`/${defaultLanguage}/home`, request.url)
56
+ );
57
+ }
58
+
59
+ return null;
60
+ },
61
+ });
62
+ ```
63
+
64
+ 使用 `after` 在 Markdown 处理之后、i18n fallback 之前运行逻辑。
65
+
66
+ ## Markdown 路由映射
67
+
68
+ `markdownRoutes` 将公开页面 URL 映射到返回 Markdown 的 App Router handler。包仍然通过 route helpers 服务 `/llms.txt` 和单页 Markdown;proxy 使用这些映射处理 `.md`、`.mdx`、`Accept: text/markdown` 和 AI-agent 请求。
69
+
70
+ ```ts title="proxy.ts"
71
+ const proxy = createProxy({
72
+ config: geistdocsConfig,
73
+ markdownRoutes: [
74
+ { from: "/docs/*path", to: "/[lang]/llms.mdx/*path" },
75
+ { from: "/cookbook/*path", to: "/[lang]/llms.mdx/cookbook/*path" },
76
+ { from: "/v5/docs/*path", to: "/[lang]/v5/llms.mdx/*path" },
77
+ ],
78
+ });
79
+ ```
80
+
81
+ | Request | Rewritten destination |
82
+ | --- | --- |
83
+ | `/docs/getting-started.md` | `/en/llms.mdx/getting-started` |
84
+ | `/cookbook/install.mdx` | `/en/llms.mdx/cookbook/install` |
85
+ | `/v5/docs/intro` with `Accept: text/markdown` | `/en/v5/llms.mdx/intro` |
86
+
87
+ ## Hook context
88
+
89
+ `before` 和 `after` 接收相同的 context:
90
+
91
+ | Property | Type | Description |
92
+ | --- | --- | --- |
93
+ | `request` | `NextRequest` | 传入请求。 |
94
+ | `context` | `NextFetchEvent` | Proxy event,包含 `waitUntil`。 |
95
+ | `defaultLanguage` | `string` | 配置的默认语言。 |
96
+ | `languages` | `string[]` | 所有配置的语言。 |
@@ -0,0 +1,178 @@
1
+ ---
2
+ title: Proxy and markdown routes
3
+ description: Add custom request logic while keeping Geistdocs markdown negotiation in the package
4
+ type: reference
5
+ summary: Configure createProxy with before and after hooks, markdown route mappings, and a static Next.js matcher.
6
+ prerequisites:
7
+ - /docs/configuration
8
+ related:
9
+ - /docs/migration
10
+ - /docs/md
11
+ - /docs/llms-txt
12
+ - /docs/versioned-docs
13
+ ---
14
+
15
+ The Geistdocs proxy handles markdown negotiation, AI-agent rewrites, request tracking, and i18n fallback. Add site-specific request logic with hooks instead of copying the package proxy implementation.
16
+
17
+ <CopyPrompt text="Review this Geistdocs proxy.ts file. Check that export const config is static, custom logic is inside createProxy before or after hooks, and markdownRoutes cover every public docs route family.">
18
+ Review this Geistdocs `proxy.ts` file. Check that `export const config` is static, custom logic is inside `createProxy` `before` or `after` hooks, and `markdownRoutes` cover every public docs route family.
19
+ </CopyPrompt>
20
+
21
+ ## Basic proxy
22
+
23
+ Generated projects use `createProxy` with the default `/docs` markdown route:
24
+
25
+ ```ts title="proxy.ts"
26
+ import { createProxy } from "@vercel/geistdocs/proxy";
27
+ import { config as geistdocsConfig } from "@/lib/geistdocs/config";
28
+ import { trackMdRequest } from "@/lib/geistdocs/md-tracking";
29
+
30
+ const proxy = createProxy({
31
+ config: geistdocsConfig,
32
+ trackMarkdownRequest: trackMdRequest,
33
+ });
34
+
35
+ export const config = {
36
+ matcher: [
37
+ "/((?!api(?:/|$)|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
38
+ ],
39
+ };
40
+
41
+ export default proxy;
42
+ ```
43
+
44
+ Keep `export const config` as a static object. Next.js reads proxy matchers at build time and does not support calling a helper for this export.
45
+
46
+ ## Custom request logic
47
+
48
+ Use `before` for logic that should run before Geistdocs markdown handling. Return a `Response` to stop processing.
49
+
50
+ ```ts title="proxy.ts"
51
+ import { createProxy } from "@vercel/geistdocs/proxy";
52
+ import { NextResponse } from "next/server";
53
+ import { config as geistdocsConfig } from "@/lib/geistdocs/config";
54
+
55
+ const proxy = createProxy({
56
+ config: geistdocsConfig,
57
+ before: async ({ request, defaultLanguage }) => {
58
+ if (request.nextUrl.pathname === "/") {
59
+ return NextResponse.rewrite(
60
+ new URL(`/${defaultLanguage}/home`, request.url)
61
+ );
62
+ }
63
+
64
+ return null;
65
+ },
66
+ });
67
+ ```
68
+
69
+ Use `after` for logic that should run after markdown handling but before the i18n fallback:
70
+
71
+ ```ts title="proxy.ts"
72
+ const proxy = createProxy({
73
+ config: geistdocsConfig,
74
+ after: async ({ request }) => {
75
+ const session = await getSessionFromReq(request);
76
+
77
+ if (!session) {
78
+ return null;
79
+ }
80
+
81
+ return refreshSession(request, session);
82
+ },
83
+ });
84
+ ```
85
+
86
+ ## Markdown route mappings
87
+
88
+ Define `content` sections in `lib/geistdocs/config.tsx` to infer standard Markdown route mappings from each section route. The package still serves `/llms.txt` and individual page Markdown through route helpers; the proxy uses these mappings for `.md`, `.mdx`, `Accept: text/markdown`, and AI-agent requests.
89
+
90
+ Geistdocs does not infer Markdown mappings for `content` sections with `route: "/"`. A root catch-all such as `/*path` can make a homepage or other application routes look like documentation. Use explicit `markdownRoutes` for root-mounted docs.
91
+
92
+ ```tsx title="lib/geistdocs/config.tsx"
93
+ export const config = defineConfig({
94
+ // ...
95
+ content: [{ id: "docs", label: "Docs", dir: "content/docs", route: "/docs" }],
96
+ });
97
+ ```
98
+
99
+ Use `markdownRoutes` when you need to override the inferred mappings:
100
+
101
+ ```ts title="proxy.ts"
102
+ const proxy = createProxy({
103
+ config: geistdocsConfig,
104
+ markdownRoutes: [
105
+ { from: "/docs/*path", to: "/[lang]/llms.mdx/*path" },
106
+ { from: "/cookbook/*path", to: "/[lang]/llms.mdx/cookbook/*path" },
107
+ { from: "/v5/docs/*path", to: "/[lang]/v5/llms.mdx/*path" },
108
+ ],
109
+ });
110
+ ```
111
+
112
+ With these mappings:
113
+
114
+ | Request | Rewritten destination |
115
+ | --- | --- |
116
+ | `/docs/getting-started.md` | `/en/llms.mdx/getting-started` |
117
+ | `/cookbook/install.mdx` | `/en/llms.mdx/cookbook/install` |
118
+ | `/v5/docs/intro` with `Accept: text/markdown` | `/en/v5/llms.mdx/intro` |
119
+
120
+ Use `[lang]` in the destination when your markdown route is nested under `app/[lang]`. Use `*path` or `:path*` to insert the matched wildcard path.
121
+
122
+ ## Root-mounted docs
123
+
124
+ For docs served from the site root, set the source `baseUrl` and config route to `/`:
125
+
126
+ ```ts title="lib/geistdocs/source.ts"
127
+ export const geistdocsSource = createSource({
128
+ docs,
129
+ config,
130
+ baseUrl: "/",
131
+ });
132
+ ```
133
+
134
+ ```tsx title="lib/geistdocs/config.tsx"
135
+ export const config = defineConfig({
136
+ // ...
137
+ content: [{ id: "docs", label: "Docs", dir: "content/docs", route: "/" }],
138
+ });
139
+ ```
140
+
141
+ If the whole site is documentation and there is no separate homepage, you can map all root paths to page-level Markdown:
142
+
143
+ ```ts title="proxy.ts"
144
+ const proxy = createProxy({
145
+ config: geistdocsConfig,
146
+ markdownRoutes: [{ from: "/*path", to: "/[lang]/llms.mdx/*path" }],
147
+ });
148
+ ```
149
+
150
+ If a homepage or app routes also live at `/`, do not use a broad `/*path` mapping. Enumerate each docs route family instead:
151
+
152
+ ```ts title="proxy.ts"
153
+ const proxy = createProxy({
154
+ config: geistdocsConfig,
155
+ markdownRoutes: [
156
+ { from: "/api-reference/*path", to: "/[lang]/llms.mdx/api-reference/*path" },
157
+ { from: "/guides/*path", to: "/[lang]/llms.mdx/guides/*path" },
158
+ { from: "/concepts/*path", to: "/[lang]/llms.mdx/concepts/*path" },
159
+ ],
160
+ });
161
+ ```
162
+
163
+ ## Hook context
164
+
165
+ Both `before` and `after` receive the same context:
166
+
167
+ | Property | Type | Description |
168
+ | --- | --- | --- |
169
+ | `request` | `NextRequest` | The incoming request. |
170
+ | `context` | `NextFetchEvent` | The proxy event, including `waitUntil`. |
171
+ | `defaultLanguage` | `string` | The configured default language. |
172
+ | `languages` | `string[]` | All configured languages. |
173
+
174
+ ## Next steps
175
+
176
+ - Read [.md extension](/docs/md) to understand single-page Markdown responses.
177
+ - Read [Migration guide](/docs/migration) to move existing middleware behavior into `createProxy` hooks.
178
+ - Read [Versioned docs](/docs/versioned-docs) to map multiple public route families.
@@ -14,7 +14,7 @@ The RSS feature provides an automatically generated RSS 2.0 feed for your docume
14
14
  Help me verify the RSS feed for this Geistdocs site. Check the `/rss.xml` route, confirm the production URL environment variable is set, and explain how page metadata affects feed items.
15
15
  </CopyPrompt>
16
16
 
17
- ## How It Works
17
+ ## How it works
18
18
 
19
19
  Geistdocs automatically generates an RSS feed that includes:
20
20
 
@@ -43,7 +43,7 @@ Users can subscribe to this URL using:
43
43
 
44
44
  ### RSS Button
45
45
 
46
- A convenient RSS button appears in the navigation bar, making it easy for users to discover and subscribe to your feed. Clicking the button opens the RSS XML in a new tab.
46
+ An RSS button appears in the navigation bar so readers can discover and subscribe to your feed. Clicking the button opens the RSS XML in a new tab.
47
47
 
48
48
  ## Feed Format
49
49
 
@@ -57,7 +57,7 @@ Use `#` symbols to create headings:
57
57
  ###### Heading 6
58
58
  ```
59
59
 
60
- Headings automatically generate anchor links for easy navigation and deep linking.
60
+ Headings automatically generate anchor links for navigation and deep linking.
61
61
 
62
62
  ### Lists
63
63
 
@@ -22,7 +22,7 @@ The `ThemeAwareImage` component renders different images depending on whether th
22
22
  Import the component and pass a `src` object with `light` and `dark` variants:
23
23
 
24
24
  ```tsx
25
- import { ThemeAwareImage } from "@/components/geistdocs/theme-aware-image";
25
+ import { ThemeAwareImage } from "@vercel/geistdocs/components/theme-aware-image";
26
26
 
27
27
  <ThemeAwareImage
28
28
  src={{
@@ -0,0 +1,117 @@
1
+ ---
2
+ title: 版本化文档
3
+ description: 使用包提供的 source helper 配置多个文档版本
4
+ type: guide
5
+ summary: 使用 createVersionedSources 配置稳定版、预发布版或基于域名的文档版本。
6
+ prerequisites:
7
+ - /docs/configuration
8
+ related:
9
+ - /docs/proxy
10
+ - /docs/llms-txt
11
+ ---
12
+
13
+ 版本化文档让一个 Geistdocs 项目服务多个文档集合。可用于稳定版、预发布版、旧主版本,或基于域名的版本切换。
14
+
15
+ ## 配置 source collection
16
+
17
+ 在 `source.config.ts` 中为每个版本创建一个 Fumadocs collection:
18
+
19
+ ```ts title="source.config.ts"
20
+ import { defineConfig, defineDocs } from "fumadocs-mdx/config";
21
+
22
+ export const v4docs = defineDocs({
23
+ dir: "content/docs/v4",
24
+ docs: {
25
+ postprocess: {
26
+ includeProcessedMarkdown: true,
27
+ },
28
+ },
29
+ });
30
+
31
+ export const v5docs = defineDocs({
32
+ dir: "content/docs/v5",
33
+ docs: {
34
+ postprocess: {
35
+ includeProcessedMarkdown: true,
36
+ },
37
+ },
38
+ });
39
+
40
+ export default defineConfig({});
41
+ ```
42
+
43
+ ## 创建版本化 sources
44
+
45
+ 在 `lib/geistdocs/source.ts` 中使用 `createVersionedSources`:
46
+
47
+ ```ts title="lib/geistdocs/source.ts"
48
+ import { createVersionedSources } from "@vercel/geistdocs/source";
49
+ import { v4docs, v5docs } from "@/.source/server";
50
+ import { config } from "./config";
51
+
52
+ export const versions = createVersionedSources({
53
+ config,
54
+ current: "v4",
55
+ versions: [
56
+ { id: "v4", label: "v4", docs: v4docs, baseUrl: "/docs" },
57
+ {
58
+ id: "v5",
59
+ label: "v5 pre-release",
60
+ docs: v5docs,
61
+ baseUrl: "/docs",
62
+ routePrefix: "/v5",
63
+ },
64
+ ],
65
+ });
66
+ ```
67
+
68
+ ## 渲染版本化页面
69
+
70
+ 当前版本可以用于 `/docs`,特定版本可以用于带版本前缀的路由:
71
+
72
+ ```tsx title="app/[lang]/v5/docs/[[...slug]]/page.tsx"
73
+ import { createDocsPage } from "@vercel/geistdocs/pages/docs";
74
+ import { config } from "@/lib/geistdocs/config";
75
+ import { versions } from "@/lib/geistdocs/source";
76
+
77
+ const docsPage = createDocsPage({
78
+ config,
79
+ source: versions.byId.v5,
80
+ getPageUrl: ({ page }) => `/v5${page.url}`,
81
+ });
82
+ ```
83
+
84
+ 当公开 URL 和 source 的 `baseUrl` 不一致时,使用 `getPageUrl` 保持页面操作和 Markdown 链接指向公开 URL。
85
+
86
+ ## 添加版本选择器
87
+
88
+ 在本地布局适配器中使用 `GeistdocsVersionSelect`:
89
+
90
+ ```tsx title="components/geistdocs/docs-layout.tsx"
91
+ import { GeistdocsVersionSelect } from "@vercel/geistdocs/versions";
92
+
93
+ <GeistdocsVersionSelect
94
+ current="v4"
95
+ versions={[
96
+ { id: "v4", label: "v4" },
97
+ { id: "v5", label: "v5 pre-release", routePrefix: "/v5" },
98
+ ]}
99
+ />
100
+ ```
101
+
102
+ 对于基于域名的版本,使用 `href`:
103
+
104
+ ```tsx
105
+ <GeistdocsVersionSelect
106
+ current="v6"
107
+ versions={[
108
+ { id: "v6", label: "v6 latest" },
109
+ { id: "v5", label: "v5", href: "https://v5.example.com/:path*" },
110
+ ]}
111
+ />
112
+ ```
113
+
114
+ ## 下一步
115
+
116
+ - 阅读 [Proxy 和 Markdown 路由](/docs/proxy),将版本化页面连接到 `.md`、`.mdx` 和 AI agent 重写。
117
+ - 阅读 [llms.txt](/docs/llms-txt),为多个 source 配置完整文档的 Markdown 输出。