@vercel/geistdocs 1.2.3-canary.48fea3c → 1.2.3-canary.53ff3db

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 (341) 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 +47 -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.js +4 -4
  138. package/dist/internal/chat/sources.js +1 -1
  139. package/dist/internal/config-context.d.ts +10 -0
  140. package/dist/internal/config-context.d.ts.map +1 -0
  141. package/dist/internal/config-context.js +15 -0
  142. package/dist/internal/footer/github-button.d.ts +7 -0
  143. package/dist/internal/footer/github-button.d.ts.map +1 -0
  144. package/dist/internal/footer/github-button.js +10 -0
  145. package/dist/internal/footer/rss-button.d.ts +2 -0
  146. package/dist/internal/footer/rss-button.d.ts.map +1 -0
  147. package/dist/internal/footer/rss-button.js +4 -0
  148. package/dist/internal/localized-link.d.ts +8 -0
  149. package/dist/internal/localized-link.d.ts.map +1 -0
  150. package/dist/internal/localized-link.js +13 -0
  151. package/dist/internal/navbar/desktop-menu.d.ts +10 -0
  152. package/dist/internal/navbar/desktop-menu.d.ts.map +1 -0
  153. package/dist/internal/navbar/desktop-menu.js +11 -0
  154. package/dist/internal/navbar/mobile-menu.d.ts +7 -0
  155. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -0
  156. package/dist/internal/navbar/mobile-menu.js +44 -0
  157. package/dist/internal/navbar/navbar-logo.d.ts +16 -0
  158. package/dist/internal/navbar/navbar-logo.d.ts.map +1 -0
  159. package/dist/internal/navbar/navbar-logo.js +30 -0
  160. package/dist/internal/page-actions-client.d.ts.map +1 -1
  161. package/dist/internal/page-actions-client.js +17 -6
  162. package/dist/internal/page-visibility.d.ts +18 -0
  163. package/dist/internal/page-visibility.d.ts.map +1 -0
  164. package/dist/internal/page-visibility.js +24 -0
  165. package/dist/internal/provider-client.d.ts +1 -1
  166. package/dist/internal/provider-client.d.ts.map +1 -1
  167. package/dist/internal/provider-client.js +2 -1
  168. package/dist/internal/sidebar.js +3 -3
  169. package/dist/internal/ui/button-group.js +2 -2
  170. package/dist/internal/ui/button.d.ts +1 -1
  171. package/dist/internal/ui/button.d.ts.map +1 -1
  172. package/dist/internal/ui/button.js +7 -7
  173. package/dist/internal/ui/card.js +1 -1
  174. package/dist/internal/ui/drawer.js +1 -1
  175. package/dist/internal/ui/dropdown-menu.js +7 -7
  176. package/dist/internal/ui/input-group.js +2 -2
  177. package/dist/internal/ui/input.js +1 -1
  178. package/dist/internal/ui/kbd.js +1 -1
  179. package/dist/internal/ui/navigation-menu.d.ts +17 -0
  180. package/dist/internal/ui/navigation-menu.d.ts.map +1 -0
  181. package/dist/internal/ui/navigation-menu.js +38 -0
  182. package/dist/internal/ui/popover.js +1 -1
  183. package/dist/internal/ui/scroll-area.js +2 -2
  184. package/dist/internal/ui/separator.js +1 -1
  185. package/dist/internal/ui/sheet.js +4 -4
  186. package/dist/internal/ui/sonner.js +3 -3
  187. package/dist/internal/ui/textarea.js +1 -1
  188. package/dist/internal/ui/tooltip.js +1 -1
  189. package/dist/mdx.d.ts +55 -24
  190. package/dist/mdx.d.ts.map +1 -1
  191. package/dist/mdx.js +7 -46
  192. package/dist/mobile-docs-bar.d.ts +7 -0
  193. package/dist/mobile-docs-bar.d.ts.map +1 -0
  194. package/dist/mobile-docs-bar.js +13 -0
  195. package/dist/navbar.d.ts +7 -0
  196. package/dist/navbar.d.ts.map +1 -0
  197. package/dist/navbar.js +10 -0
  198. package/dist/pages/docs.d.ts +8 -2
  199. package/dist/pages/docs.d.ts.map +1 -1
  200. package/dist/pages/docs.js +13 -7
  201. package/dist/proxy.d.ts +1 -1
  202. package/dist/proxy.d.ts.map +1 -1
  203. package/dist/proxy.js +29 -2
  204. package/dist/routes/agents.d.ts +21 -0
  205. package/dist/routes/agents.d.ts.map +1 -0
  206. package/dist/routes/agents.js +201 -0
  207. package/dist/routes/chat.d.ts +7 -2
  208. package/dist/routes/chat.d.ts.map +1 -1
  209. package/dist/routes/chat.js +357 -62
  210. package/dist/routes/llms.d.ts +6 -5
  211. package/dist/routes/llms.d.ts.map +1 -1
  212. package/dist/routes/llms.js +63 -12
  213. package/dist/routes/search.d.ts +6 -4
  214. package/dist/routes/search.d.ts.map +1 -1
  215. package/dist/routes/search.js +8 -1
  216. package/dist/routes/sitemap.d.ts +6 -3
  217. package/dist/routes/sitemap.d.ts.map +1 -1
  218. package/dist/routes/sitemap.js +10 -2
  219. package/dist/shiki-theme.d.ts +20 -0
  220. package/dist/shiki-theme.d.ts.map +1 -0
  221. package/dist/shiki-theme.js +110 -0
  222. package/dist/source-config.d.ts +68 -0
  223. package/dist/source-config.d.ts.map +1 -0
  224. package/dist/source-config.js +161 -0
  225. package/dist/source.d.ts +8 -1
  226. package/dist/source.d.ts.map +1 -1
  227. package/dist/source.js +14 -1
  228. package/dist/versions.d.ts +31 -1
  229. package/dist/versions.d.ts.map +1 -1
  230. package/dist/versions.js +56 -29
  231. package/package.json +124 -3
  232. package/source-config.js +174 -0
  233. package/styles.css +465 -102
  234. package/template/AGENTS.md +90 -0
  235. package/template/app/[lang]/(home)/components/centered-section.tsx +1 -3
  236. package/template/app/[lang]/(home)/components/hero.tsx +2 -2
  237. package/template/app/[lang]/(home)/components/one-two-section.tsx +1 -3
  238. package/template/app/[lang]/(home)/components/templates.tsx +3 -5
  239. package/template/app/[lang]/(home)/components/text-grid-section.tsx +1 -1
  240. package/template/app/[lang]/(home)/layout.tsx +4 -3
  241. package/template/app/[lang]/(home)/page.tsx +2 -2
  242. package/template/app/[lang]/agents.md/route.ts +6 -0
  243. package/template/app/[lang]/docs/[[...slug]]/page.tsx +4 -1
  244. package/template/app/[lang]/layout.tsx +6 -6
  245. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +1 -1
  246. package/template/app/[lang]/sitemap.md/route.ts +2 -2
  247. package/template/app/api/chat/route.ts +11 -0
  248. package/template/app/api/search/route.ts +2 -2
  249. package/template/app/styles/geistdocs.css +150 -109
  250. package/template/components/ui/badge.tsx +5 -5
  251. package/template/components/ui/button.tsx +7 -7
  252. package/template/components/ui/command-prompt.tsx +2 -2
  253. package/template/content/docs/agent-readiness.mdx +103 -0
  254. package/template/content/docs/ask-ai.mdx +37 -3
  255. package/template/content/docs/configuration.mdx +77 -2
  256. package/template/content/docs/deployment.mdx +11 -0
  257. package/template/content/docs/env.mdx +36 -5
  258. package/template/content/docs/getting-started.mdx +2 -1
  259. package/template/content/docs/index.mdx +3 -0
  260. package/template/content/docs/llms-txt.mdx +1 -0
  261. package/template/content/docs/md.mdx +2 -1
  262. package/template/content/docs/meta.json +2 -0
  263. package/template/content/docs/migration.mdx +321 -0
  264. package/template/content/docs/proxy.cn.mdx +1 -1
  265. package/template/content/docs/proxy.mdx +56 -2
  266. package/template/content/docs/theme-aware-image.mdx +1 -1
  267. package/template/content/docs/versioned-docs.mdx +49 -2
  268. package/template/geistdocs.tsx +26 -0
  269. package/template/lib/geistdocs/config.tsx +3 -0
  270. package/template/package.json +3 -3
  271. package/template/proxy.ts +1 -2
  272. package/template/source.config.ts +8 -47
  273. package/template/app/actions/feedback/emotions.ts +0 -18
  274. package/template/app/actions/feedback/index.ts +0 -45
  275. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +0 -35
  276. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +0 -27
  277. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +0 -27
  278. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +0 -30
  279. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +0 -27
  280. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +0 -27
  281. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +0 -25
  282. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +0 -27
  283. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +0 -36
  284. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +0 -29
  285. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +0 -38
  286. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +0 -42
  287. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +0 -42
  288. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +0 -31
  289. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +0 -29
  290. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +0 -24
  291. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +0 -73
  292. package/template/components/geistdocs/callout.tsx +0 -40
  293. package/template/components/geistdocs/chat.tsx +0 -24
  294. package/template/components/geistdocs/code-block-tabs.tsx +0 -61
  295. package/template/components/geistdocs/code-block.tsx +0 -134
  296. package/template/components/geistdocs/copy-page.tsx +0 -27
  297. package/template/components/geistdocs/desktop-menu.tsx +0 -52
  298. package/template/components/geistdocs/docs-page.tsx +0 -35
  299. package/template/components/geistdocs/edit-source.tsx +0 -30
  300. package/template/components/geistdocs/feedback.tsx +0 -139
  301. package/template/components/geistdocs/footer.tsx +0 -30
  302. package/template/components/geistdocs/github-button.tsx +0 -19
  303. package/template/components/geistdocs/home-layout.tsx +0 -46
  304. package/template/components/geistdocs/icons.tsx +0 -13
  305. package/template/components/geistdocs/installer.tsx +0 -58
  306. package/template/components/geistdocs/language-selector.tsx +0 -3
  307. package/template/components/geistdocs/mermaid.tsx +0 -68
  308. package/template/components/geistdocs/mobile-docs-bar.tsx +0 -77
  309. package/template/components/geistdocs/mobile-menu.tsx +0 -150
  310. package/template/components/geistdocs/navbar-logo.tsx +0 -124
  311. package/template/components/geistdocs/navbar.tsx +0 -22
  312. package/template/components/geistdocs/rss-button.tsx +0 -10
  313. package/template/components/geistdocs/scroll-top.tsx +0 -21
  314. package/template/components/geistdocs/search.tsx +0 -17
  315. package/template/components/geistdocs/sidebar.tsx +0 -128
  316. package/template/components/geistdocs/theme-aware-image.tsx +0 -22
  317. package/template/components/geistdocs/theme-toggle.tsx +0 -3
  318. package/template/components/geistdocs/video.tsx +0 -16
  319. package/template/components/ui/button-group.tsx +0 -83
  320. package/template/components/ui/card.tsx +0 -92
  321. package/template/components/ui/collapsible.tsx +0 -33
  322. package/template/components/ui/command.tsx +0 -184
  323. package/template/components/ui/dialog.tsx +0 -143
  324. package/template/components/ui/drawer.tsx +0 -135
  325. package/template/components/ui/dropdown-menu.tsx +0 -257
  326. package/template/components/ui/hover-card.tsx +0 -44
  327. package/template/components/ui/input-group.tsx +0 -170
  328. package/template/components/ui/input.tsx +0 -21
  329. package/template/components/ui/kbd.tsx +0 -28
  330. package/template/components/ui/navigation-menu.tsx +0 -192
  331. package/template/components/ui/popover.tsx +0 -48
  332. package/template/components/ui/scroll-area.tsx +0 -58
  333. package/template/components/ui/select.tsx +0 -187
  334. package/template/components/ui/separator.tsx +0 -28
  335. package/template/components/ui/sheet.tsx +0 -139
  336. package/template/components/ui/sonner.tsx +0 -40
  337. package/template/components/ui/spinner.tsx +0 -16
  338. package/template/components/ui/textarea.tsx +0 -18
  339. package/template/components/ui/tooltip.tsx +0 -61
  340. package/template/hooks/geistdocs/use-sidebar.ts +0 -13
  341. package/template/hooks/use-mobile.ts +0 -19
@@ -0,0 +1,321 @@
1
+ ---
2
+ title: Migration guide
3
+ description: Migrate a Fumadocs or custom Geist docs site to package-backed Geistdocs
4
+ type: guide
5
+ summary: Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
6
+ prerequisites:
7
+ - /docs/configuration
8
+ - /docs/proxy
9
+ related:
10
+ - /docs/versioned-docs
11
+ - /docs/llms-txt
12
+ - /docs/agent-readiness
13
+ ---
14
+
15
+ Migrate an existing Fumadocs or custom Geist documentation site to `@vercel/geistdocs` by moving shared behavior into package APIs and keeping site-specific adapters local. The safest migration keeps content, routing decisions, and product-specific UI in your app while replacing copied runtime code with thin package-backed adapters.
16
+
17
+ <CopyPrompt text="Help me migrate this existing docs site to package-backed Geistdocs. Inspect source.config.ts, lib/geistdocs/source.ts, app route files, proxy.ts or middleware.ts, public/llms.txt, Open Graph routes, Tailwind CSS setup, and environment variables. Then produce a step-by-step migration plan using @vercel/geistdocs package APIs without copying package internals.">
18
+ Help me migrate this existing docs site to package-backed Geistdocs. Inspect `source.config.ts`, `lib/geistdocs/source.ts`, app route files, `proxy.ts` or `middleware.ts`, `public/llms.txt`, Open Graph routes, Tailwind CSS setup, and environment variables. Then produce a step-by-step migration plan using `@vercel/geistdocs` package APIs without copying package internals.
19
+ </CopyPrompt>
20
+
21
+ ## Before you migrate
22
+
23
+ Create a working branch and inventory the current site before replacing code:
24
+
25
+ - Existing Fumadocs collections in `source.config.ts`.
26
+ - Public route families, such as `/docs`, `/api-reference`, `/guides`, or `/`.
27
+ - Existing `middleware.ts` or `proxy.ts` behavior.
28
+ - Static files that overlap package routes, such as `public/llms.txt`.
29
+ - Search, chat, `llms.txt`, page-level Markdown, `sitemap.md`, `agents.md`, RSS, and Open Graph routes.
30
+ - Tailwind CSS version and custom plugins.
31
+ - Environment variables required by the homepage, docs routes, or API routes.
32
+
33
+ Run the current project before changing it:
34
+
35
+ ```bash title="Terminal"
36
+ pnpm install
37
+ pnpm build
38
+ ```
39
+
40
+ Fix unrelated build failures first. A migration is safer when the starting point is reproducible.
41
+
42
+ ## Install Geistdocs
43
+
44
+ Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting.
45
+
46
+ For an existing project, use your package manager directly:
47
+
48
+ ```bash title="Terminal"
49
+ pnpm add @vercel/geistdocs
50
+ ```
51
+
52
+ If you are starting from a generated Geistdocs project and moving content into it, use the CLI:
53
+
54
+ ```bash title="Terminal"
55
+ pnpm dlx @vercel/geistdocs init --name my-docs
56
+ ```
57
+
58
+ ## Update source config
59
+
60
+ Use the source-config-safe export from `@vercel/geistdocs/source-config` in `source.config.ts`. This file is evaluated by `fumadocs-mdx` during dependency installation and builds, so avoid importing runtime component entry points from it.
61
+
62
+ ```ts title="source.config.ts"
63
+ import {
64
+ defineGeistdocsSourceConfig,
65
+ geistdocsFrontmatterSchema,
66
+ geistdocsMetaSchema,
67
+ } from "@vercel/geistdocs/source-config";
68
+ import { defineDocs } from "fumadocs-mdx/config";
69
+
70
+ export const docs = defineDocs({
71
+ dir: "content/docs",
72
+ docs: {
73
+ schema: geistdocsFrontmatterSchema,
74
+ postprocess: {
75
+ includeProcessedMarkdown: true,
76
+ },
77
+ },
78
+ meta: {
79
+ schema: geistdocsMetaSchema,
80
+ },
81
+ });
82
+
83
+ export default defineGeistdocsSourceConfig();
84
+ ```
85
+
86
+ For multiple docs families, create one collection per directory and reuse `geistdocsFrontmatterSchema`.
87
+
88
+ ## Create the package config
89
+
90
+ Use `@vercel/geistdocs/config` to centralize site metadata and route families in `lib/geistdocs/config.tsx`.
91
+
92
+ ```tsx title="lib/geistdocs/config.tsx"
93
+ import { defineConfig } from "@vercel/geistdocs/config";
94
+ import { Logo, github, nav, prompt, suggestions, title } from "@/geistdocs";
95
+
96
+ export const config = defineConfig({
97
+ title,
98
+ defaultLanguage: "en",
99
+ logo: <Logo />,
100
+ github,
101
+ nav,
102
+ content: [{ id: "docs", label: "Docs", dir: "content/docs", route: "/docs" }],
103
+ ai: {
104
+ prompt,
105
+ suggestions,
106
+ },
107
+ });
108
+ ```
109
+
110
+ Set `content` to every public documentation route family. `createProxy` uses this metadata to infer standard Markdown mappings for non-root sections.
111
+
112
+ ## Connect Fumadocs sources
113
+
114
+ Wrap each Fumadocs collection with `createSource` in `lib/geistdocs/source.ts`.
115
+
116
+ ```ts title="lib/geistdocs/source.ts"
117
+ import { createSource } from "@vercel/geistdocs/source";
118
+ import { docs } from "@/.source/server";
119
+ import { config } from "./config";
120
+
121
+ export const geistdocsSource = createSource({
122
+ docs,
123
+ config,
124
+ id: "docs",
125
+ label: "Docs",
126
+ });
127
+
128
+ export const source = geistdocsSource.source;
129
+ ```
130
+
131
+ For root-mounted docs, set `baseUrl: "/"` and use explicit `markdownRoutes` in `proxy.ts`:
132
+
133
+ ```ts title="lib/geistdocs/source.ts"
134
+ export const geistdocsSource = createSource({
135
+ docs,
136
+ config,
137
+ baseUrl: "/",
138
+ });
139
+ ```
140
+
141
+ ## Add route adapters
142
+
143
+ Keep App Router files thin. Route files should call package helpers instead of copying package internals.
144
+
145
+ ```tsx title="app/[lang]/docs/[[...slug]]/page.tsx"
146
+ import { createDocsPage } from "@vercel/geistdocs/pages/docs";
147
+ import { config } from "@/lib/geistdocs/config";
148
+ import { geistdocsSource } from "@/lib/geistdocs/source";
149
+
150
+ const docsPage = createDocsPage({
151
+ config,
152
+ source: geistdocsSource,
153
+ openGraph: {
154
+ images: true,
155
+ },
156
+ });
157
+
158
+ export default docsPage.Page;
159
+ export const generateStaticParams = docsPage.generateStaticParams;
160
+ export const generateMetadata = docsPage.generateMetadata;
161
+ ```
162
+
163
+ Set `openGraph.images` to `true` only when your app includes the Geistdocs OG route. If you do not add the OG route, omit `openGraph` or override metadata to avoid broken `/og/...` references.
164
+
165
+ ## Add AI-readable routes
166
+
167
+ Add the package route helpers for machine-readable docs surfaces.
168
+
169
+ ```ts title="app/[lang]/llms.txt/route.ts"
170
+ import { createLlmsRoute } from "@vercel/geistdocs/routes/llms";
171
+ import { geistdocsSource } from "@/lib/geistdocs/source";
172
+
173
+ export const { GET, revalidate } = createLlmsRoute({
174
+ sources: [geistdocsSource],
175
+ });
176
+ ```
177
+
178
+ ```ts title="app/[lang]/llms.mdx/[[...slug]]/route.ts"
179
+ import { createDocsMarkdownRoute } from "@vercel/geistdocs/routes/llms";
180
+ import { geistdocsSource } from "@/lib/geistdocs/source";
181
+
182
+ export const { GET, generateStaticParams, revalidate } =
183
+ createDocsMarkdownRoute({
184
+ source: geistdocsSource,
185
+ });
186
+ ```
187
+
188
+ ```ts title="app/[lang]/sitemap.md/route.ts"
189
+ import { createSitemapMarkdownRoute } from "@vercel/geistdocs/routes/sitemap";
190
+ import { config } from "@/lib/geistdocs/config";
191
+ import { geistdocsSource } from "@/lib/geistdocs/source";
192
+
193
+ export const { GET, generateStaticParams, revalidate, dynamic } =
194
+ createSitemapMarkdownRoute({
195
+ config,
196
+ sources: [{ source: geistdocsSource.source }],
197
+ });
198
+ ```
199
+
200
+ ```ts title="app/[lang]/agents.md/route.ts"
201
+ import { createAgentsRoute } from "@vercel/geistdocs/routes/agents";
202
+ import { config } from "@/lib/geistdocs/config";
203
+
204
+ export const { GET, generateStaticParams, revalidate } = createAgentsRoute({
205
+ config,
206
+ });
207
+ ```
208
+
209
+ Delete `public/llms.txt` after adding `createLlmsRoute`. Static files in `public` can mask App Router route behavior.
210
+
211
+ ## Migrate middleware behavior
212
+
213
+ Use `createProxy` in `proxy.ts`. Put existing `middleware.ts` behavior in `before` or `after` hooks instead of replacing Geistdocs markdown negotiation.
214
+
215
+ ```ts title="proxy.ts"
216
+ import { createProxy } from "@vercel/geistdocs/proxy";
217
+ import { NextResponse } from "next/server";
218
+ import { config as geistdocsConfig } from "@/lib/geistdocs/config";
219
+
220
+ const proxy = createProxy({
221
+ config: geistdocsConfig,
222
+ before: async ({ request }) => {
223
+ if (request.nextUrl.pathname === "/legacy-docs") {
224
+ return NextResponse.redirect(new URL("/docs", request.url));
225
+ }
226
+
227
+ return null;
228
+ },
229
+ });
230
+
231
+ export const config = {
232
+ matcher: [
233
+ "/((?!api(?:/|$)|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
234
+ ],
235
+ };
236
+
237
+ export default proxy;
238
+ ```
239
+
240
+ Use `api(?:/|$)` in the matcher. A broad `api` exclusion also excludes routes such as `/api-reference`.
241
+
242
+ ## Configure Markdown route mappings
243
+
244
+ For standard non-root sections, `createProxy` can infer Markdown routes from `config.content`.
245
+
246
+ Use explicit `markdownRoutes` when the public docs URL does not map directly to the Markdown route handler:
247
+
248
+ ```ts title="proxy.ts"
249
+ const proxy = createProxy({
250
+ config: geistdocsConfig,
251
+ markdownRoutes: [
252
+ { from: "/docs/*path", to: "/[lang]/llms.mdx/*path" },
253
+ { from: "/api-reference/*path", to: "/[lang]/llms.mdx/api-reference/*path" },
254
+ ],
255
+ });
256
+ ```
257
+
258
+ Root-mounted docs need explicit mappings. If a homepage or app routes also live at `/`, do not use a broad `/*path` mapping. Map each docs family separately:
259
+
260
+ ```ts title="proxy.ts"
261
+ const proxy = createProxy({
262
+ config: geistdocsConfig,
263
+ markdownRoutes: [
264
+ { from: "/guides/*path", to: "/[lang]/llms.mdx/guides/*path" },
265
+ { from: "/api-reference/*path", to: "/[lang]/llms.mdx/api-reference/*path" },
266
+ ],
267
+ });
268
+ ```
269
+
270
+ ## Configure Tailwind CSS
271
+
272
+ Tailwind CSS v4 requires `@source` entries for package components and related dependencies.
273
+
274
+ ```css title="app/styles/geistdocs.css"
275
+ @import "tailwindcss";
276
+ @import "fumadocs-ui/css/shadcn.css";
277
+ @import "fumadocs-ui/css/preset.css";
278
+ @import "tw-animate-css";
279
+
280
+ @source "../../node_modules/@vercel/geistdocs/dist/**/*.js";
281
+ @source "../../node_modules/streamdown/dist/*.js";
282
+ ```
283
+
284
+ Move Tailwind CSS v3 plugin utilities into CSS-first v4 utilities or theme variables. Keep custom token names stable while you migrate components.
285
+
286
+ ## Handle environment variables
287
+
288
+ Do not require production secrets for local migration builds. If a homepage or API route depends on a production-only secret, add a local fallback or disable that integration in development.
289
+
290
+ ```ts title="lib/example-secret.ts"
291
+ export const flagsSecret =
292
+ process.env.FLAGS_SECRET ??
293
+ (process.env.NODE_ENV === "development" ? "local-development-secret" : undefined);
294
+ ```
295
+
296
+ Keep real secrets in `.env.local` and out of Git.
297
+
298
+ ## Verify the migration
299
+
300
+ Run the same checks after each routing or source change:
301
+
302
+ ```bash title="Terminal"
303
+ pnpm postinstall
304
+ pnpm build
305
+ pnpm dev
306
+ ```
307
+
308
+ Check these URLs locally:
309
+
310
+ - `/docs` or the migrated docs root.
311
+ - `/llms.txt`.
312
+ - `/sitemap.md`.
313
+ - `/agents.md`.
314
+ - A page-level Markdown URL such as `/docs/getting-started.mdx`.
315
+ - A non-docs route that should not be rewritten as Markdown, such as the homepage.
316
+
317
+ ## Next steps
318
+
319
+ - Read [Configuration](/docs/configuration) to review package config options.
320
+ - Read [Proxy and markdown routes](/docs/proxy) to tune request handling.
321
+ - Read [Agent readiness](/docs/agent-readiness) to configure `/agents.md` for AI agents.
@@ -29,7 +29,7 @@ const proxy = createProxy({
29
29
 
30
30
  export const config = {
31
31
  matcher: [
32
- "/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
32
+ "/((?!api(?:/|$)|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
33
33
  ],
34
34
  };
35
35
 
@@ -6,6 +6,7 @@ summary: Configure createProxy with before and after hooks, markdown route mappi
6
6
  prerequisites:
7
7
  - /docs/configuration
8
8
  related:
9
+ - /docs/migration
9
10
  - /docs/md
10
11
  - /docs/llms-txt
11
12
  - /docs/versioned-docs
@@ -33,7 +34,7 @@ const proxy = createProxy({
33
34
 
34
35
  export const config = {
35
36
  matcher: [
36
- "/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
37
+ "/((?!api(?:/|$)|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
37
38
  ],
38
39
  };
39
40
 
@@ -84,7 +85,18 @@ const proxy = createProxy({
84
85
 
85
86
  ## Markdown route mappings
86
87
 
87
- `markdownRoutes` maps public page URLs to the App Router handlers that return Markdown. 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.
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:
88
100
 
89
101
  ```ts title="proxy.ts"
90
102
  const proxy = createProxy({
@@ -107,6 +119,47 @@ With these mappings:
107
119
 
108
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.
109
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
+
110
163
  ## Hook context
111
164
 
112
165
  Both `before` and `after` receive the same context:
@@ -121,4 +174,5 @@ Both `before` and `after` receive the same context:
121
174
  ## Next steps
122
175
 
123
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.
124
178
  - Read [Versioned docs](/docs/versioned-docs) to map multiple public route families.
@@ -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={{
@@ -21,11 +21,16 @@ Versioned docs let you serve multiple documentation sets from one Geistdocs proj
21
21
  Create one Fumadocs collection for each version in `source.config.ts`:
22
22
 
23
23
  ```ts title="source.config.ts"
24
- import { defineConfig, defineDocs } from "fumadocs-mdx/config";
24
+ import {
25
+ defineGeistdocsSourceConfig,
26
+ geistdocsFrontmatterSchema,
27
+ } from "@vercel/geistdocs/source-config";
28
+ import { defineDocs } from "fumadocs-mdx/config";
25
29
 
26
30
  export const v4docs = defineDocs({
27
31
  dir: "content/docs/v4",
28
32
  docs: {
33
+ schema: geistdocsFrontmatterSchema,
29
34
  postprocess: {
30
35
  includeProcessedMarkdown: true,
31
36
  },
@@ -35,13 +40,14 @@ export const v4docs = defineDocs({
35
40
  export const v5docs = defineDocs({
36
41
  dir: "content/docs/v5",
37
42
  docs: {
43
+ schema: geistdocsFrontmatterSchema,
38
44
  postprocess: {
39
45
  includeProcessedMarkdown: true,
40
46
  },
41
47
  },
42
48
  });
43
49
 
44
- export default defineConfig({});
50
+ export default defineGeistdocsSourceConfig();
45
51
  ```
46
52
 
47
53
  ## Create versioned sources
@@ -158,6 +164,47 @@ export const DocsLayout = ({ tree, children }: DocsLayoutProps) => (
158
164
  );
159
165
  ```
160
166
 
167
+ Each version can define an `icon` to override the default current/previous version icons:
168
+
169
+ ```tsx
170
+ <GeistdocsVersionSelect
171
+ current="v6"
172
+ versions={[
173
+ { id: "v6", label: "v6 latest", icon: <span>6</span> },
174
+ { id: "v5", label: "v5", icon: <span>5</span>, routePrefix: "/v5" },
175
+ ]}
176
+ />
177
+ ```
178
+
179
+ Use `GeistdocsRouteSelect` for framework, product, or route switchers that should not use version-specific labels:
180
+
181
+ ```tsx
182
+ import { LogoNextjs, LogoSvelteKit } from "@vercel/geistdocs/assets/logos";
183
+ import { GeistdocsRouteSelect } from "@vercel/geistdocs/versions";
184
+
185
+ <GeistdocsRouteSelect
186
+ ariaLabel="Select framework"
187
+ current="nextjs"
188
+ items={[
189
+ {
190
+ id: "nextjs",
191
+ label: "Next.js",
192
+ description: "React framework",
193
+ icon: <LogoNextjs height={18} />,
194
+ href: "/:path*",
195
+ },
196
+ {
197
+ id: "sveltekit",
198
+ label: "SvelteKit",
199
+ description: "Svelte framework",
200
+ icon: <LogoSvelteKit height={18} />,
201
+ routePrefix: "/sveltekit",
202
+ href: "/sveltekit/:path*",
203
+ },
204
+ ]}
205
+ />
206
+ ```
207
+
161
208
  For host-based versions, use `href` instead of `routePrefix`:
162
209
 
163
210
  ```tsx
@@ -1,3 +1,5 @@
1
+ import type { GeistdocsAgentReadinessConfig } from "@vercel/geistdocs/config";
2
+
1
3
  export const Logo = () => (
2
4
  <span className="font-semibold text-gray-1000 text-lg leading-none tracking-[-3%]">
3
5
  Geistdocs
@@ -5,6 +7,8 @@ export const Logo = () => (
5
7
  );
6
8
 
7
9
  export const github = {
10
+ branch: "main",
11
+ editPath: "content/docs/{path}",
8
12
  owner: "vercel",
9
13
  repo: "geistdocs",
10
14
  };
@@ -32,6 +36,28 @@ export const title = "Geistdocs Documentation";
32
36
  export const prompt =
33
37
  "You are a helpful assistant specializing in answering questions about Geistdocs, a modern documentation template built with Next.js and Fumadocs.";
34
38
 
39
+ export const agent = {
40
+ product: {
41
+ name: "Geistdocs",
42
+ description:
43
+ "Geistdocs is a package-backed documentation system for creating Next.js and Fumadocs sites with shared Vercel documentation patterns.",
44
+ category: "Documentation",
45
+ audience: ["Documentation authors", "Developer experience teams"],
46
+ useCases: [
47
+ "Create package-backed documentation sites",
48
+ "Expose docs as AI-readable Markdown",
49
+ "Share Vercel docs UI and runtime behavior across projects",
50
+ ],
51
+ },
52
+ links: [
53
+ {
54
+ label: "Geistdocs source",
55
+ href: `https://github.com/${github.owner}/${github.repo}`,
56
+ description: "Source repository for the Geistdocs package and template",
57
+ },
58
+ ],
59
+ } satisfies GeistdocsAgentReadinessConfig;
60
+
35
61
  export const translations = {
36
62
  en: {
37
63
  displayName: "English",
@@ -1,5 +1,6 @@
1
1
  import { defineConfig } from "@vercel/geistdocs/config";
2
2
  import {
3
+ agent,
3
4
  basePath,
4
5
  github,
5
6
  Logo,
@@ -13,6 +14,7 @@ import {
13
14
 
14
15
  export const config = defineConfig({
15
16
  title,
17
+ agent,
16
18
  defaultLanguage: "en",
17
19
  logo: <Logo />,
18
20
  github,
@@ -20,6 +22,7 @@ export const config = defineConfig({
20
22
  basePath,
21
23
  siteId,
22
24
  translations,
25
+ content: [{ id: "docs", label: "Docs", dir: "content/docs", route: "/docs" }],
23
26
  ai: {
24
27
  prompt,
25
28
  suggestions,
@@ -14,7 +14,7 @@
14
14
  "@ai-sdk/react": "^2.0.115",
15
15
  "@icons-pack/react-simple-icons": "^13.8.0",
16
16
  "@orama/tokenizers": "^3.1.16",
17
- "@vercel/geistdocs": "1.2.3-canary.48fea3c",
17
+ "@vercel/geistdocs": "1.2.3-canary.53ff3db",
18
18
  "@streamdown/cjk": "^1.0.1",
19
19
  "@streamdown/code": "^1.0.1",
20
20
  "@vercel/agent-readability": "^0.2.1",
@@ -35,13 +35,13 @@
35
35
  "mermaid": "^11.12.2",
36
36
  "motion": "^12.23.25",
37
37
  "nanoid": "^5.1.6",
38
- "next": "16.0.10",
38
+ "next": "16.2.6",
39
39
  "next-themes": "^0.4.6",
40
40
  "radix-ui": "latest",
41
41
  "react": "^19.2.3",
42
42
  "react-dom": "^19.2.3",
43
43
  "react-player": "^3.4.0",
44
- "shiki": "^3.22.0",
44
+ "shiki": "3.19.0",
45
45
  "sonner": "^2.0.7",
46
46
  "streamdown": "^2.1.0",
47
47
  "tailwind-merge": "^3.4.0",
package/template/proxy.ts CHANGED
@@ -5,13 +5,12 @@ import { trackMdRequest } from "@/lib/geistdocs/md-tracking";
5
5
  const proxy = createProxy({
6
6
  config: geistdocsConfig,
7
7
  trackMarkdownRequest: trackMdRequest,
8
- markdownRoutes: [{ from: "/docs/*path", to: "/[lang]/llms.mdx/*path" }],
9
8
  before: () => null,
10
9
  });
11
10
 
12
11
  export const config = {
13
12
  matcher: [
14
- "/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
13
+ "/((?!api(?:/|$)|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
15
14
  ],
16
15
  };
17
16
 
@@ -1,62 +1,23 @@
1
- import { remarkMdxMermaid } from "fumadocs-core/mdx-plugins";
2
1
  import {
3
- defineConfig,
4
- defineDocs,
5
- frontmatterSchema,
6
- metaSchema,
7
- } from "fumadocs-mdx/config";
8
- import lastModified from "fumadocs-mdx/plugins/last-modified";
9
- import { z } from "zod";
2
+ defineGeistdocsSourceConfig,
3
+ geistdocsFrontmatterSchema,
4
+ geistdocsMetaSchema,
5
+ } from "@vercel/geistdocs/source-config";
6
+ import { defineDocs } from "fumadocs-mdx/config";
10
7
 
11
8
  // You can customise Zod schemas for frontmatter and `meta.json` here
12
9
  // see https://fumadocs.dev/docs/mdx/collections
13
10
  export const docs = defineDocs({
14
11
  dir: "content/docs",
15
12
  docs: {
16
- schema: frontmatterSchema.extend({
17
- product: z.string().optional(),
18
- url: z
19
- .string()
20
- .regex(/^\/.*/, { message: "url must start with a slash" })
21
- .optional(),
22
- type: z
23
- .enum([
24
- "conceptual", // Explains what something is and why it exists. Architecture, mental models, design decisions.
25
- "guide", // Walks through how to accomplish a goal. Tutorials, getting started, workflows.
26
- "reference", // Lookup-oriented, exhaustive details. API docs, config options, function signatures.
27
- "troubleshooting", // Diagnoses problems and solutions. FAQs, errors, known issues, debugging guides.
28
- "integration", // Connects multiple systems. 3rd-party setup, plugins, webhooks, migrations.
29
- "overview", // High-level introductions. Landing pages, changelogs, release notes.
30
- ])
31
- .optional(),
32
- prerequisites: z
33
- .array(
34
- z.string().regex(/^\/.*/, {
35
- message: "prerequisites must start with a slash",
36
- })
37
- )
38
- .optional(),
39
- related: z
40
- .array(
41
- z
42
- .string()
43
- .regex(/^\/.*/, { message: "related must start with a slash" })
44
- )
45
- .optional(),
46
- summary: z.string().optional(),
47
- }),
13
+ schema: geistdocsFrontmatterSchema,
48
14
  postprocess: {
49
15
  includeProcessedMarkdown: true,
50
16
  },
51
17
  },
52
18
  meta: {
53
- schema: metaSchema,
19
+ schema: geistdocsMetaSchema,
54
20
  },
55
21
  });
56
22
 
57
- export default defineConfig({
58
- mdxOptions: {
59
- remarkPlugins: [remarkMdxMermaid],
60
- },
61
- plugins: [lastModified()],
62
- });
23
+ export default defineGeistdocsSourceConfig();