@vercel/geistdocs 1.3.0-canary.88e35b7 → 1.3.1

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 (374) 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 +5 -0
  56. package/dist/assets/logos/logo-svelte-kit.d.ts.map +1 -0
  57. package/dist/assets/logos/logo-svelte-kit.js +4 -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 +2 -5
  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.d.ts.map +1 -1
  76. package/dist/components/code-block.js +7 -3
  77. package/dist/components/collapsible.d.ts +2 -0
  78. package/dist/components/collapsible.d.ts.map +1 -0
  79. package/dist/components/collapsible.js +3 -0
  80. package/dist/components/copy-prompt.d.ts +11 -0
  81. package/dist/components/copy-prompt.d.ts.map +1 -0
  82. package/dist/components/copy-prompt.js +58 -0
  83. package/dist/components/dialog.d.ts +13 -0
  84. package/dist/components/dialog.d.ts.map +1 -0
  85. package/dist/components/dialog.js +35 -0
  86. package/dist/components/drawer.d.ts +2 -0
  87. package/dist/components/drawer.d.ts.map +1 -0
  88. package/dist/components/drawer.js +3 -0
  89. package/dist/components/dropdown-menu.d.ts +2 -0
  90. package/dist/components/dropdown-menu.d.ts.map +1 -0
  91. package/dist/components/dropdown-menu.js +3 -0
  92. package/dist/components/input-group.d.ts +2 -0
  93. package/dist/components/input-group.d.ts.map +1 -0
  94. package/dist/components/input-group.js +3 -0
  95. package/dist/components/input.d.ts +2 -0
  96. package/dist/components/input.d.ts.map +1 -0
  97. package/dist/components/input.js +2 -0
  98. package/dist/components/kbd.d.ts +2 -0
  99. package/dist/components/kbd.d.ts.map +1 -0
  100. package/dist/components/kbd.js +2 -0
  101. package/dist/components/navigation-menu.d.ts +2 -0
  102. package/dist/components/navigation-menu.d.ts.map +1 -0
  103. package/dist/components/navigation-menu.js +3 -0
  104. package/dist/components/popover.d.ts +2 -0
  105. package/dist/components/popover.d.ts.map +1 -0
  106. package/dist/components/popover.js +3 -0
  107. package/dist/components/scroll-area.d.ts +2 -0
  108. package/dist/components/scroll-area.d.ts.map +1 -0
  109. package/dist/components/scroll-area.js +3 -0
  110. package/dist/components/separator.d.ts +2 -0
  111. package/dist/components/separator.d.ts.map +1 -0
  112. package/dist/components/separator.js +3 -0
  113. package/dist/components/sheet.d.ts +2 -0
  114. package/dist/components/sheet.d.ts.map +1 -0
  115. package/dist/components/sheet.js +3 -0
  116. package/dist/components/sonner.d.ts +2 -0
  117. package/dist/components/sonner.d.ts.map +1 -0
  118. package/dist/components/sonner.js +3 -0
  119. package/dist/components/spinner.d.ts +2 -0
  120. package/dist/components/spinner.d.ts.map +1 -0
  121. package/dist/components/spinner.js +2 -0
  122. package/dist/components/textarea.d.ts +2 -0
  123. package/dist/components/textarea.d.ts.map +1 -0
  124. package/dist/components/textarea.js +2 -0
  125. package/dist/components/tooltip.d.ts +2 -0
  126. package/dist/components/tooltip.d.ts.map +1 -0
  127. package/dist/components/tooltip.js +3 -0
  128. package/dist/config.d.ts +66 -1
  129. package/dist/config.d.ts.map +1 -1
  130. package/dist/controls.js +4 -4
  131. package/dist/footer.d.ts +8 -0
  132. package/dist/footer.d.ts.map +1 -0
  133. package/dist/footer.js +6 -0
  134. package/dist/home-layout.d.ts +11 -0
  135. package/dist/home-layout.d.ts.map +1 -0
  136. package/dist/home-layout.js +31 -0
  137. package/dist/internal/chat/conversation.js +1 -1
  138. package/dist/internal/chat/message.js +1 -1
  139. package/dist/internal/chat/prompt-input.js +1 -1
  140. package/dist/internal/chat/shell.d.ts.map +1 -1
  141. package/dist/internal/chat/shell.js +6 -5
  142. package/dist/internal/chat/sources.js +1 -1
  143. package/dist/internal/config-context.d.ts +10 -0
  144. package/dist/internal/config-context.d.ts.map +1 -0
  145. package/dist/internal/config-context.js +15 -0
  146. package/dist/internal/footer/github-button.d.ts +7 -0
  147. package/dist/internal/footer/github-button.d.ts.map +1 -0
  148. package/dist/internal/footer/github-button.js +10 -0
  149. package/dist/internal/footer/rss-button.d.ts +2 -0
  150. package/dist/internal/footer/rss-button.d.ts.map +1 -0
  151. package/dist/internal/footer/rss-button.js +4 -0
  152. package/dist/internal/localized-link.d.ts +8 -0
  153. package/dist/internal/localized-link.d.ts.map +1 -0
  154. package/dist/internal/localized-link.js +13 -0
  155. package/dist/internal/navbar/desktop-menu.d.ts +10 -0
  156. package/dist/internal/navbar/desktop-menu.d.ts.map +1 -0
  157. package/dist/internal/navbar/desktop-menu.js +11 -0
  158. package/dist/internal/navbar/mobile-menu.d.ts +7 -0
  159. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -0
  160. package/dist/internal/navbar/mobile-menu.js +44 -0
  161. package/dist/internal/navbar/navbar-logo.d.ts +16 -0
  162. package/dist/internal/navbar/navbar-logo.d.ts.map +1 -0
  163. package/dist/internal/navbar/navbar-logo.js +30 -0
  164. package/dist/internal/page-actions-client.d.ts +1 -2
  165. package/dist/internal/page-actions-client.d.ts.map +1 -1
  166. package/dist/internal/page-actions-client.js +28 -11
  167. package/dist/internal/page-visibility.d.ts +18 -0
  168. package/dist/internal/page-visibility.d.ts.map +1 -0
  169. package/dist/internal/page-visibility.js +24 -0
  170. package/dist/internal/provider-client.d.ts +9 -0
  171. package/dist/internal/provider-client.d.ts.map +1 -0
  172. package/dist/internal/provider-client.js +24 -0
  173. package/dist/internal/sidebar.d.ts +4 -1
  174. package/dist/internal/sidebar.d.ts.map +1 -1
  175. package/dist/internal/sidebar.js +8 -7
  176. package/dist/internal/table-of-contents.d.ts +9 -0
  177. package/dist/internal/table-of-contents.d.ts.map +1 -0
  178. package/dist/internal/table-of-contents.js +5 -0
  179. package/dist/internal/ui/button-group.js +2 -2
  180. package/dist/internal/ui/button.d.ts +1 -1
  181. package/dist/internal/ui/button.d.ts.map +1 -1
  182. package/dist/internal/ui/button.js +7 -7
  183. package/dist/internal/ui/card.js +1 -1
  184. package/dist/internal/ui/drawer.js +1 -1
  185. package/dist/internal/ui/dropdown-menu.js +7 -7
  186. package/dist/internal/ui/input-group.js +2 -2
  187. package/dist/internal/ui/input.js +1 -1
  188. package/dist/internal/ui/kbd.js +1 -1
  189. package/dist/internal/ui/navigation-menu.d.ts +17 -0
  190. package/dist/internal/ui/navigation-menu.d.ts.map +1 -0
  191. package/dist/internal/ui/navigation-menu.js +38 -0
  192. package/dist/internal/ui/popover.js +1 -1
  193. package/dist/internal/ui/scroll-area.js +2 -2
  194. package/dist/internal/ui/separator.js +1 -1
  195. package/dist/internal/ui/sheet.js +4 -4
  196. package/dist/internal/ui/sonner.js +3 -3
  197. package/dist/internal/ui/textarea.js +1 -1
  198. package/dist/internal/ui/tooltip.js +1 -1
  199. package/dist/layout.d.ts +4 -8
  200. package/dist/layout.d.ts.map +1 -1
  201. package/dist/layout.js +26 -44
  202. package/dist/mdx.d.ts +55 -24
  203. package/dist/mdx.d.ts.map +1 -1
  204. package/dist/mdx.js +9 -46
  205. package/dist/mobile-docs-bar.d.ts +7 -0
  206. package/dist/mobile-docs-bar.d.ts.map +1 -0
  207. package/dist/mobile-docs-bar.js +13 -0
  208. package/dist/navbar.d.ts +7 -0
  209. package/dist/navbar.d.ts.map +1 -0
  210. package/dist/navbar.js +10 -0
  211. package/dist/pages/docs.d.ts +33 -5
  212. package/dist/pages/docs.d.ts.map +1 -1
  213. package/dist/pages/docs.js +57 -22
  214. package/dist/proxy.d.ts +24 -8
  215. package/dist/proxy.d.ts.map +1 -1
  216. package/dist/proxy.js +116 -36
  217. package/dist/routes/agents.d.ts +21 -0
  218. package/dist/routes/agents.d.ts.map +1 -0
  219. package/dist/routes/agents.js +201 -0
  220. package/dist/routes/chat.d.ts +11 -5
  221. package/dist/routes/chat.d.ts.map +1 -1
  222. package/dist/routes/chat.js +386 -65
  223. package/dist/routes/llms.d.ts +29 -10
  224. package/dist/routes/llms.d.ts.map +1 -1
  225. package/dist/routes/llms.js +80 -9
  226. package/dist/routes/search.d.ts +8 -5
  227. package/dist/routes/search.d.ts.map +1 -1
  228. package/dist/routes/search.js +52 -4
  229. package/dist/routes/sitemap.d.ts +15 -3
  230. package/dist/routes/sitemap.d.ts.map +1 -1
  231. package/dist/routes/sitemap.js +32 -6
  232. package/dist/shiki-theme.d.ts +20 -0
  233. package/dist/shiki-theme.d.ts.map +1 -0
  234. package/dist/shiki-theme.js +110 -0
  235. package/dist/sidebar.d.ts +11 -0
  236. package/dist/sidebar.d.ts.map +1 -0
  237. package/dist/sidebar.js +16 -0
  238. package/dist/source-config.d.ts +68 -0
  239. package/dist/source-config.d.ts.map +1 -0
  240. package/dist/source-config.js +161 -0
  241. package/dist/source.d.ts +155 -4
  242. package/dist/source.d.ts.map +1 -1
  243. package/dist/source.js +73 -3
  244. package/dist/versions.d.ts +45 -0
  245. package/dist/versions.d.ts.map +1 -0
  246. package/dist/versions.js +79 -0
  247. package/package.json +142 -9
  248. package/source-config.js +174 -0
  249. package/styles.css +465 -102
  250. package/template/AGENTS.md +95 -0
  251. package/template/app/[lang]/(home)/components/centered-section.tsx +1 -3
  252. package/template/app/[lang]/(home)/components/hero.tsx +2 -2
  253. package/template/app/[lang]/(home)/components/one-two-section.tsx +1 -3
  254. package/template/app/[lang]/(home)/components/templates.tsx +3 -5
  255. package/template/app/[lang]/(home)/components/text-grid-section.tsx +1 -1
  256. package/template/app/[lang]/(home)/layout.tsx +4 -3
  257. package/template/app/[lang]/(home)/page.tsx +2 -2
  258. package/template/app/[lang]/agents.md/route.ts +6 -0
  259. package/template/app/[lang]/docs/[[...slug]]/page.tsx +4 -1
  260. package/template/app/[lang]/layout.tsx +6 -6
  261. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +1 -1
  262. package/template/app/[lang]/llms.txt/route.ts +1 -1
  263. package/template/app/[lang]/sitemap.md/route.ts +2 -2
  264. package/template/app/api/chat/route.ts +12 -1
  265. package/template/app/api/search/route.ts +2 -2
  266. package/template/app/styles/geistdocs.css +151 -109
  267. package/template/components/ui/badge.tsx +5 -5
  268. package/template/components/ui/button.tsx +7 -7
  269. package/template/components/ui/command-prompt.tsx +2 -2
  270. package/template/content/docs/agent-readiness.mdx +103 -0
  271. package/template/content/docs/ask-ai.mdx +61 -5
  272. package/template/content/docs/configuration.cn.mdx +47 -7
  273. package/template/content/docs/configuration.mdx +226 -66
  274. package/template/content/docs/deployment.mdx +17 -0
  275. package/template/content/docs/edit-on-github.mdx +6 -2
  276. package/template/content/docs/env.mdx +38 -3
  277. package/template/content/docs/feedback.mdx +6 -2
  278. package/template/content/docs/getting-started.cn.mdx +2 -2
  279. package/template/content/docs/getting-started.mdx +71 -43
  280. package/template/content/docs/index.cn.mdx +36 -33
  281. package/template/content/docs/index.mdx +69 -59
  282. package/template/content/docs/internationalization.cn.mdx +7 -9
  283. package/template/content/docs/internationalization.mdx +10 -5
  284. package/template/content/docs/llms-txt.cn.mdx +24 -2
  285. package/template/content/docs/llms-txt.mdx +48 -12
  286. package/template/content/docs/md.cn.mdx +12 -15
  287. package/template/content/docs/md.mdx +30 -16
  288. package/template/content/docs/meta.json +6 -2
  289. package/template/content/docs/migration.mdx +364 -0
  290. package/template/content/docs/open-in-chat.mdx +12 -10
  291. package/template/content/docs/provider.cn.mdx +6 -5
  292. package/template/content/docs/provider.mdx +13 -8
  293. package/template/content/docs/proxy.cn.mdx +96 -0
  294. package/template/content/docs/proxy.mdx +178 -0
  295. package/template/content/docs/rss.mdx +6 -2
  296. package/template/content/docs/syntax.cn.mdx +2 -2
  297. package/template/content/docs/syntax.mdx +6 -2
  298. package/template/content/docs/theme-aware-image.mdx +5 -1
  299. package/template/content/docs/versioned-docs.cn.mdx +117 -0
  300. package/template/content/docs/versioned-docs.mdx +228 -0
  301. package/template/geistdocs.tsx +26 -0
  302. package/template/lib/geistdocs/config.tsx +3 -0
  303. package/template/package.json +5 -5
  304. package/template/proxy.ts +2 -1
  305. package/template/source.config.ts +8 -47
  306. package/template/app/actions/feedback/emotions.ts +0 -18
  307. package/template/app/actions/feedback/index.ts +0 -45
  308. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +0 -35
  309. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +0 -27
  310. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +0 -27
  311. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +0 -30
  312. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +0 -27
  313. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +0 -27
  314. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +0 -25
  315. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +0 -27
  316. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +0 -36
  317. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +0 -29
  318. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +0 -38
  319. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +0 -42
  320. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +0 -42
  321. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +0 -31
  322. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +0 -29
  323. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +0 -24
  324. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +0 -73
  325. package/template/components/geistdocs/callout.tsx +0 -40
  326. package/template/components/geistdocs/chat.tsx +0 -24
  327. package/template/components/geistdocs/code-block-tabs.tsx +0 -61
  328. package/template/components/geistdocs/code-block.tsx +0 -134
  329. package/template/components/geistdocs/copy-page.tsx +0 -27
  330. package/template/components/geistdocs/desktop-menu.tsx +0 -52
  331. package/template/components/geistdocs/docs-page.tsx +0 -35
  332. package/template/components/geistdocs/edit-source.tsx +0 -30
  333. package/template/components/geistdocs/feedback.tsx +0 -139
  334. package/template/components/geistdocs/footer.tsx +0 -30
  335. package/template/components/geistdocs/github-button.tsx +0 -19
  336. package/template/components/geistdocs/home-layout.tsx +0 -46
  337. package/template/components/geistdocs/icons.tsx +0 -13
  338. package/template/components/geistdocs/installer.tsx +0 -58
  339. package/template/components/geistdocs/language-selector.tsx +0 -3
  340. package/template/components/geistdocs/mermaid.tsx +0 -68
  341. package/template/components/geistdocs/mobile-docs-bar.tsx +0 -81
  342. package/template/components/geistdocs/mobile-menu.tsx +0 -150
  343. package/template/components/geistdocs/navbar-logo.tsx +0 -124
  344. package/template/components/geistdocs/navbar.tsx +0 -22
  345. package/template/components/geistdocs/rss-button.tsx +0 -10
  346. package/template/components/geistdocs/scroll-top.tsx +0 -21
  347. package/template/components/geistdocs/search.tsx +0 -17
  348. package/template/components/geistdocs/sidebar.tsx +0 -128
  349. package/template/components/geistdocs/theme-aware-image.tsx +0 -22
  350. package/template/components/geistdocs/theme-toggle.tsx +0 -3
  351. package/template/components/geistdocs/video.tsx +0 -16
  352. package/template/components/ui/button-group.tsx +0 -83
  353. package/template/components/ui/card.tsx +0 -92
  354. package/template/components/ui/collapsible.tsx +0 -33
  355. package/template/components/ui/command.tsx +0 -184
  356. package/template/components/ui/dialog.tsx +0 -143
  357. package/template/components/ui/drawer.tsx +0 -135
  358. package/template/components/ui/dropdown-menu.tsx +0 -257
  359. package/template/components/ui/hover-card.tsx +0 -44
  360. package/template/components/ui/input-group.tsx +0 -170
  361. package/template/components/ui/input.tsx +0 -21
  362. package/template/components/ui/kbd.tsx +0 -28
  363. package/template/components/ui/navigation-menu.tsx +0 -192
  364. package/template/components/ui/popover.tsx +0 -48
  365. package/template/components/ui/scroll-area.tsx +0 -58
  366. package/template/components/ui/select.tsx +0 -187
  367. package/template/components/ui/separator.tsx +0 -28
  368. package/template/components/ui/sheet.tsx +0 -139
  369. package/template/components/ui/sonner.tsx +0 -40
  370. package/template/components/ui/spinner.tsx +0 -16
  371. package/template/components/ui/textarea.tsx +0 -18
  372. package/template/components/ui/tooltip.tsx +0 -61
  373. package/template/hooks/geistdocs/use-sidebar.ts +0 -13
  374. package/template/hooks/use-mobile.ts +0 -19
@@ -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.
@@ -10,7 +10,11 @@ related:
10
10
 
11
11
  The RSS feature provides an automatically generated RSS 2.0 feed for your documentation. This allows users to subscribe to updates and stay informed when new content is published or existing pages are modified.
12
12
 
13
- ## How It Works
13
+ <CopyPrompt text="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.">
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
+ </CopyPrompt>
16
+
17
+ ## How it works
14
18
 
15
19
  Geistdocs automatically generates an RSS feed that includes:
16
20
 
@@ -39,7 +43,7 @@ Users can subscribe to this URL using:
39
43
 
40
44
  ### RSS Button
41
45
 
42
- 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.
43
47
 
44
48
  ## Feed Format
45
49
 
@@ -39,7 +39,7 @@ description: A brief description of the page content
39
39
 
40
40
  使用 `#` 符号创建标题:
41
41
 
42
- ```md
42
+ ```text
43
43
  # Heading 1
44
44
 
45
45
  ## Heading 2
@@ -413,4 +413,4 @@ graph TD;
413
413
  C --> E
414
414
  E --> F
415
415
  E --> G
416
- ```
416
+ ```
@@ -11,6 +11,10 @@ related:
11
11
 
12
12
  Geistdocs supports MDX, a superset of Markdown that allows you to use JSX components within your documentation. This guide covers all the formatting options available.
13
13
 
14
+ <CopyPrompt text="Help me write a Geistdocs MDX page. Use this page as a syntax reference and create an example page with frontmatter, headings, links, a code block, a Callout, and a CopyPrompt component.">
15
+ Help me write a Geistdocs MDX page. Use this page as a syntax reference and create an example page with frontmatter, headings, links, a code block, a `Callout`, and a `CopyPrompt` component.
16
+ </CopyPrompt>
17
+
14
18
  ## Frontmatter
15
19
 
16
20
  Every MDX file should include frontmatter at the top:
@@ -39,7 +43,7 @@ You can style text using standard Markdown syntax:
39
43
 
40
44
  Use `#` symbols to create headings:
41
45
 
42
- ```md
46
+ ```text
43
47
  # Heading 1
44
48
 
45
49
  ## Heading 2
@@ -53,7 +57,7 @@ Use `#` symbols to create headings:
53
57
  ###### Heading 6
54
58
  ```
55
59
 
56
- Headings automatically generate anchor links for easy navigation and deep linking.
60
+ Headings automatically generate anchor links for navigation and deep linking.
57
61
 
58
62
  ### Lists
59
63
 
@@ -13,12 +13,16 @@ related:
13
13
 
14
14
  The `ThemeAwareImage` component renders different images depending on whether the user is viewing your documentation in light or dark mode. It extends the Next.js `Image` component, so you get all the same optimization benefits like lazy loading, responsive sizing, and format conversion.
15
15
 
16
+ <CopyPrompt text="Help me add a theme-aware image to a Geistdocs MDX page. Create a usage example with light and dark image sources, alt text, width, and height, then explain where to place the image files.">
17
+ Help me add a theme-aware image to a Geistdocs MDX page. Create a usage example with light and dark image sources, alt text, width, and height, then explain where to place the image files.
18
+ </CopyPrompt>
19
+
16
20
  ## Usage
17
21
 
18
22
  Import the component and pass a `src` object with `light` and `dark` variants:
19
23
 
20
24
  ```tsx
21
- import { ThemeAwareImage } from "@/components/geistdocs/theme-aware-image";
25
+ import { ThemeAwareImage } from "@vercel/geistdocs/components/theme-aware-image";
22
26
 
23
27
  <ThemeAwareImage
24
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 输出。