@vercel/geistdocs 1.2.2 → 1.2.3-canary.48fea3c

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 (339) hide show
  1. package/dist/cli/index.js +3 -0
  2. package/dist/components/callout.d.ts +12 -0
  3. package/dist/components/callout.d.ts.map +1 -0
  4. package/dist/components/callout.js +7 -0
  5. package/dist/components/code-block-tabs.d.ts +7 -0
  6. package/dist/components/code-block-tabs.d.ts.map +1 -0
  7. package/dist/components/code-block-tabs.js +7 -0
  8. package/dist/components/code-block.d.ts +14 -0
  9. package/dist/components/code-block.d.ts.map +1 -0
  10. package/dist/components/code-block.js +45 -0
  11. package/dist/components/copy-prompt.d.ts +11 -0
  12. package/dist/components/copy-prompt.d.ts.map +1 -0
  13. package/dist/components/copy-prompt.js +58 -0
  14. package/dist/components/mermaid.d.ts +4 -0
  15. package/dist/components/mermaid.d.ts.map +1 -0
  16. package/dist/components/mermaid.js +44 -0
  17. package/dist/components/theme-aware-image.d.ts +12 -0
  18. package/dist/components/theme-aware-image.d.ts.map +1 -0
  19. package/dist/components/theme-aware-image.js +8 -0
  20. package/dist/components/video.d.ts +6 -0
  21. package/dist/components/video.d.ts.map +1 -0
  22. package/dist/components/video.js +3 -0
  23. package/dist/config.d.ts +71 -0
  24. package/dist/config.d.ts.map +1 -0
  25. package/dist/config.js +1 -0
  26. package/dist/controls.d.ts +15 -0
  27. package/dist/controls.d.ts.map +1 -0
  28. package/dist/controls.js +52 -0
  29. package/dist/internal/chat/context.d.ts +19 -0
  30. package/dist/internal/chat/context.d.ts.map +1 -0
  31. package/dist/internal/chat/context.js +36 -0
  32. package/dist/internal/chat/conversation.d.ts +10 -0
  33. package/dist/internal/chat/conversation.d.ts.map +1 -0
  34. package/dist/internal/chat/conversation.js +16 -0
  35. package/dist/internal/chat/copy-chat.d.ts +5 -0
  36. package/dist/internal/chat/copy-chat.d.ts.map +1 -0
  37. package/dist/internal/chat/copy-chat.js +35 -0
  38. package/dist/internal/chat/db.d.ts +13 -0
  39. package/dist/internal/chat/db.d.ts.map +1 -0
  40. package/dist/internal/chat/db.js +19 -0
  41. package/dist/internal/chat/message-metadata.d.ts +8 -0
  42. package/dist/internal/chat/message-metadata.d.ts.map +1 -0
  43. package/dist/internal/chat/message-metadata.js +29 -0
  44. package/dist/internal/chat/message.d.ts +11 -0
  45. package/dist/internal/chat/message.d.ts.map +1 -0
  46. package/dist/internal/chat/message.js +11 -0
  47. package/dist/internal/chat/prompt-input.d.ts +13 -0
  48. package/dist/internal/chat/prompt-input.d.ts.map +1 -0
  49. package/dist/internal/chat/prompt-input.js +39 -0
  50. package/dist/internal/chat/shell.d.ts +2 -0
  51. package/dist/internal/chat/shell.d.ts.map +1 -0
  52. package/dist/internal/chat/shell.js +194 -0
  53. package/dist/internal/chat/shimmer.d.ts +11 -0
  54. package/dist/internal/chat/shimmer.d.ts.map +1 -0
  55. package/dist/internal/chat/shimmer.js +18 -0
  56. package/dist/internal/chat/sources.d.ts +13 -0
  57. package/dist/internal/chat/sources.d.ts.map +1 -0
  58. package/dist/internal/chat/sources.js +9 -0
  59. package/dist/internal/chat/suggestion.d.ts +11 -0
  60. package/dist/internal/chat/suggestion.d.ts.map +1 -0
  61. package/dist/internal/chat/suggestion.js +12 -0
  62. package/dist/internal/cn.d.ts +3 -0
  63. package/dist/internal/cn.d.ts.map +1 -0
  64. package/dist/internal/cn.js +3 -0
  65. package/dist/internal/feedback-action.d.ts +14 -0
  66. package/dist/internal/feedback-action.d.ts.map +1 -0
  67. package/dist/internal/feedback-action.js +34 -0
  68. package/dist/internal/i18n.d.ts +6 -0
  69. package/dist/internal/i18n.d.ts.map +1 -0
  70. package/dist/internal/i18n.js +18 -0
  71. package/dist/internal/languages.d.ts +7 -0
  72. package/dist/internal/languages.d.ts.map +1 -0
  73. package/dist/internal/languages.js +18 -0
  74. package/dist/internal/not-implemented.d.ts +2 -0
  75. package/dist/internal/not-implemented.d.ts.map +1 -0
  76. package/dist/internal/not-implemented.js +4 -0
  77. package/dist/internal/page-actions-client.d.ts +13 -0
  78. package/dist/internal/page-actions-client.d.ts.map +1 -0
  79. package/dist/internal/page-actions-client.js +160 -0
  80. package/dist/internal/page-actions.d.ts +18 -0
  81. package/dist/internal/page-actions.d.ts.map +1 -0
  82. package/dist/internal/page-actions.js +4 -0
  83. package/dist/internal/provider-client.d.ts +9 -0
  84. package/dist/internal/provider-client.d.ts.map +1 -0
  85. package/dist/internal/provider-client.js +23 -0
  86. package/dist/internal/search.d.ts +5 -0
  87. package/dist/internal/search.d.ts.map +1 -0
  88. package/dist/internal/search.js +14 -0
  89. package/dist/internal/sidebar.d.ts +9 -0
  90. package/dist/internal/sidebar.d.ts.map +1 -0
  91. package/dist/internal/sidebar.js +38 -0
  92. package/dist/internal/table-of-contents.d.ts +9 -0
  93. package/dist/internal/table-of-contents.d.ts.map +1 -0
  94. package/dist/internal/table-of-contents.js +5 -0
  95. package/dist/internal/ui/button-group.d.ts +13 -0
  96. package/dist/internal/ui/button-group.d.ts.map +1 -0
  97. package/dist/internal/ui/button-group.js +26 -0
  98. package/dist/internal/ui/button.d.ts +12 -0
  99. package/dist/internal/ui/button.d.ts.map +1 -0
  100. package/dist/internal/ui/button.js +33 -0
  101. package/dist/internal/ui/card.d.ts +6 -0
  102. package/dist/internal/ui/card.d.ts.map +1 -0
  103. package/dist/internal/ui/card.js +14 -0
  104. package/dist/internal/ui/collapsible.d.ts +6 -0
  105. package/dist/internal/ui/collapsible.d.ts.map +1 -0
  106. package/dist/internal/ui/collapsible.js +12 -0
  107. package/dist/internal/ui/drawer.d.ts +6 -0
  108. package/dist/internal/ui/drawer.d.ts.map +1 -0
  109. package/dist/internal/ui/drawer.js +13 -0
  110. package/dist/internal/ui/dropdown-menu.d.ts +22 -0
  111. package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
  112. package/dist/internal/ui/dropdown-menu.js +41 -0
  113. package/dist/internal/ui/input-group.d.ts +15 -0
  114. package/dist/internal/ui/input-group.d.ts.map +1 -0
  115. package/dist/internal/ui/input-group.js +44 -0
  116. package/dist/internal/ui/input.d.ts +3 -0
  117. package/dist/internal/ui/input.d.ts.map +1 -0
  118. package/dist/internal/ui/input.js +5 -0
  119. package/dist/internal/ui/kbd.d.ts +4 -0
  120. package/dist/internal/ui/kbd.d.ts.map +1 -0
  121. package/dist/internal/ui/kbd.js +8 -0
  122. package/dist/internal/ui/popover.d.ts +6 -0
  123. package/dist/internal/ui/popover.d.ts.map +1 -0
  124. package/dist/internal/ui/popover.js +13 -0
  125. package/dist/internal/ui/scroll-area.d.ts +5 -0
  126. package/dist/internal/ui/scroll-area.d.ts.map +1 -0
  127. package/dist/internal/ui/scroll-area.js +12 -0
  128. package/dist/internal/ui/separator.d.ts +4 -0
  129. package/dist/internal/ui/separator.d.ts.map +1 -0
  130. package/dist/internal/ui/separator.js +7 -0
  131. package/dist/internal/ui/sheet.d.ts +10 -0
  132. package/dist/internal/ui/sheet.d.ts.map +1 -0
  133. package/dist/internal/ui/sheet.js +24 -0
  134. package/dist/internal/ui/sonner.d.ts +3 -0
  135. package/dist/internal/ui/sonner.d.ts.map +1 -0
  136. package/dist/internal/ui/sonner.js +20 -0
  137. package/dist/internal/ui/spinner.d.ts +3 -0
  138. package/dist/internal/ui/spinner.d.ts.map +1 -0
  139. package/dist/internal/ui/spinner.js +6 -0
  140. package/dist/internal/ui/textarea.d.ts +3 -0
  141. package/dist/internal/ui/textarea.d.ts.map +1 -0
  142. package/dist/internal/ui/textarea.js +5 -0
  143. package/dist/internal/ui/tooltip.d.ts +7 -0
  144. package/dist/internal/ui/tooltip.d.ts.map +1 -0
  145. package/dist/internal/ui/tooltip.js +16 -0
  146. package/dist/internal/use-mobile.d.ts +2 -0
  147. package/dist/internal/use-mobile.d.ts.map +1 -0
  148. package/dist/internal/use-mobile.js +16 -0
  149. package/dist/layout.d.ts +14 -0
  150. package/dist/layout.d.ts.map +1 -0
  151. package/dist/layout.js +31 -0
  152. package/dist/mdx.d.ts +36 -0
  153. package/dist/mdx.d.ts.map +1 -0
  154. package/dist/mdx.js +74 -0
  155. package/dist/pages/docs.d.ts +77 -0
  156. package/dist/pages/docs.d.ts.map +1 -0
  157. package/dist/pages/docs.js +92 -0
  158. package/dist/proxy.d.ts +37 -0
  159. package/dist/proxy.d.ts.map +1 -0
  160. package/dist/proxy.js +162 -0
  161. package/dist/routes/chat.d.ts +14 -0
  162. package/dist/routes/chat.d.ts.map +1 -0
  163. package/dist/routes/chat.js +242 -0
  164. package/dist/routes/llms.d.ts +51 -0
  165. package/dist/routes/llms.d.ts.map +1 -0
  166. package/dist/routes/llms.js +59 -0
  167. package/dist/routes/search.d.ts +11 -0
  168. package/dist/routes/search.d.ts.map +1 -0
  169. package/dist/routes/search.js +74 -0
  170. package/dist/routes/sitemap.d.ts +44 -0
  171. package/dist/routes/sitemap.d.ts.map +1 -0
  172. package/dist/routes/sitemap.js +168 -0
  173. package/dist/sidebar.d.ts +11 -0
  174. package/dist/sidebar.d.ts.map +1 -0
  175. package/dist/sidebar.js +16 -0
  176. package/dist/source.d.ts +174 -0
  177. package/dist/source.d.ts.map +1 -0
  178. package/dist/source.js +129 -0
  179. package/dist/versions.d.ts +15 -0
  180. package/dist/versions.d.ts.map +1 -0
  181. package/dist/versions.js +52 -0
  182. package/package.json +141 -9
  183. package/styles.css +193 -0
  184. package/template/_gitignore +29 -0
  185. package/template/app/[lang]/(home)/components/centered-section.tsx +26 -0
  186. package/template/app/[lang]/(home)/components/cta.tsx +19 -0
  187. package/template/app/[lang]/(home)/components/hero.tsx +27 -0
  188. package/template/app/[lang]/(home)/components/one-two-section.tsx +25 -0
  189. package/template/app/[lang]/(home)/components/templates.tsx +50 -0
  190. package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
  191. package/template/app/[lang]/(home)/layout.tsx +14 -0
  192. package/template/app/[lang]/(home)/page.tsx +126 -0
  193. package/template/app/[lang]/docs/[[...slug]]/page.tsx +19 -0
  194. package/template/app/[lang]/docs/layout.tsx +14 -0
  195. package/template/app/[lang]/layout.tsx +29 -0
  196. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
  197. package/template/app/[lang]/llms.txt/route.ts +6 -0
  198. package/template/app/[lang]/og/[...slug]/background.png +0 -0
  199. package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
  200. package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
  201. package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
  202. package/template/app/[lang]/rss.xml/route.ts +52 -0
  203. package/template/app/[lang]/sitemap.md/route.ts +9 -0
  204. package/template/app/actions/feedback/emotions.ts +18 -0
  205. package/template/app/actions/feedback/index.ts +45 -0
  206. package/template/app/api/chat/route.ts +8 -0
  207. package/template/app/api/search/route.ts +5 -0
  208. package/template/app/favicon.ico +0 -0
  209. package/template/app/global.css +2 -0
  210. package/template/app/robots.ts +14 -0
  211. package/template/app/sitemap.ts +36 -0
  212. package/template/app/styles/geistdocs.css +554 -0
  213. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +35 -0
  214. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +27 -0
  215. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +27 -0
  216. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +30 -0
  217. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +27 -0
  218. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +27 -0
  219. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +25 -0
  220. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +27 -0
  221. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +36 -0
  222. package/template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx +11 -0
  223. package/template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx +14 -0
  224. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +29 -0
  225. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +38 -0
  226. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +42 -0
  227. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +42 -0
  228. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +31 -0
  229. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +29 -0
  230. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +24 -0
  231. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +73 -0
  232. package/template/components/geistdocs/callout.tsx +40 -0
  233. package/template/components/geistdocs/chat.tsx +24 -0
  234. package/template/components/geistdocs/code-block-tabs.tsx +61 -0
  235. package/template/components/geistdocs/code-block.tsx +134 -0
  236. package/template/components/geistdocs/copy-page.tsx +27 -0
  237. package/template/components/geistdocs/desktop-menu.tsx +52 -0
  238. package/template/components/geistdocs/docs-layout.tsx +20 -0
  239. package/template/components/geistdocs/docs-page.tsx +35 -0
  240. package/template/components/geistdocs/edit-source.tsx +30 -0
  241. package/template/components/geistdocs/feedback.tsx +139 -0
  242. package/template/components/geistdocs/footer.tsx +30 -0
  243. package/template/components/geistdocs/github-button.tsx +19 -0
  244. package/template/components/geistdocs/home-layout.tsx +46 -0
  245. package/template/components/geistdocs/icons.tsx +13 -0
  246. package/template/components/geistdocs/installer.tsx +58 -0
  247. package/template/components/geistdocs/language-selector.tsx +3 -0
  248. package/template/components/geistdocs/mdx-components.tsx +5 -0
  249. package/template/components/geistdocs/mermaid.tsx +68 -0
  250. package/template/components/geistdocs/mobile-docs-bar.tsx +77 -0
  251. package/template/components/geistdocs/mobile-menu.tsx +150 -0
  252. package/template/components/geistdocs/navbar-logo.tsx +124 -0
  253. package/template/components/geistdocs/navbar.tsx +22 -0
  254. package/template/components/geistdocs/provider.tsx +31 -0
  255. package/template/components/geistdocs/rss-button.tsx +10 -0
  256. package/template/components/geistdocs/scroll-top.tsx +21 -0
  257. package/template/components/geistdocs/search.tsx +17 -0
  258. package/template/components/geistdocs/sidebar.tsx +128 -0
  259. package/template/components/geistdocs/theme-aware-image.tsx +22 -0
  260. package/template/components/geistdocs/theme-toggle.tsx +3 -0
  261. package/template/components/geistdocs/video.tsx +16 -0
  262. package/template/components/ui/badge.tsx +46 -0
  263. package/template/components/ui/button-group.tsx +83 -0
  264. package/template/components/ui/button.tsx +60 -0
  265. package/template/components/ui/card.tsx +92 -0
  266. package/template/components/ui/collapsible.tsx +33 -0
  267. package/template/components/ui/command-prompt.tsx +488 -0
  268. package/template/components/ui/command.tsx +184 -0
  269. package/template/components/ui/dialog.tsx +143 -0
  270. package/template/components/ui/drawer.tsx +135 -0
  271. package/template/components/ui/dropdown-menu.tsx +257 -0
  272. package/template/components/ui/hover-card.tsx +44 -0
  273. package/template/components/ui/input-group.tsx +170 -0
  274. package/template/components/ui/input.tsx +21 -0
  275. package/template/components/ui/kbd.tsx +28 -0
  276. package/template/components/ui/navigation-menu.tsx +192 -0
  277. package/template/components/ui/popover.tsx +48 -0
  278. package/template/components/ui/scroll-area.tsx +58 -0
  279. package/template/components/ui/select.tsx +187 -0
  280. package/template/components/ui/separator.tsx +28 -0
  281. package/template/components/ui/sheet.tsx +139 -0
  282. package/template/components/ui/sonner.tsx +40 -0
  283. package/template/components/ui/spinner.tsx +16 -0
  284. package/template/components/ui/textarea.tsx +18 -0
  285. package/template/components/ui/tooltip.tsx +61 -0
  286. package/template/components.json +22 -0
  287. package/template/content/docs/ask-ai.cn.mdx +85 -0
  288. package/template/content/docs/ask-ai.mdx +89 -0
  289. package/template/content/docs/configuration.cn.mdx +155 -0
  290. package/template/content/docs/configuration.mdx +200 -0
  291. package/template/content/docs/deployment.cn.mdx +34 -0
  292. package/template/content/docs/deployment.mdx +40 -0
  293. package/template/content/docs/edit-on-github.cn.mdx +47 -0
  294. package/template/content/docs/edit-on-github.mdx +51 -0
  295. package/template/content/docs/env.cn.mdx +25 -0
  296. package/template/content/docs/env.mdx +29 -0
  297. package/template/content/docs/feedback.cn.mdx +85 -0
  298. package/template/content/docs/feedback.mdx +89 -0
  299. package/template/content/docs/getting-started.cn.mdx +86 -0
  300. package/template/content/docs/getting-started.mdx +107 -0
  301. package/template/content/docs/index.cn.mdx +57 -0
  302. package/template/content/docs/index.mdx +92 -0
  303. package/template/content/docs/internationalization.cn.mdx +111 -0
  304. package/template/content/docs/internationalization.mdx +122 -0
  305. package/template/content/docs/llms-txt.cn.mdx +72 -0
  306. package/template/content/docs/llms-txt.mdx +85 -0
  307. package/template/content/docs/md.cn.mdx +65 -0
  308. package/template/content/docs/md.mdx +81 -0
  309. package/template/content/docs/meta.json +23 -0
  310. package/template/content/docs/open-in-chat.cn.mdx +78 -0
  311. package/template/content/docs/open-in-chat.mdx +80 -0
  312. package/template/content/docs/provider.cn.mdx +70 -0
  313. package/template/content/docs/provider.mdx +74 -0
  314. package/template/content/docs/proxy.cn.mdx +96 -0
  315. package/template/content/docs/proxy.mdx +124 -0
  316. package/template/content/docs/rss.cn.mdx +104 -0
  317. package/template/content/docs/rss.mdx +108 -0
  318. package/template/content/docs/syntax.cn.mdx +416 -0
  319. package/template/content/docs/syntax.mdx +411 -0
  320. package/template/content/docs/theme-aware-image.mdx +57 -0
  321. package/template/content/docs/versioned-docs.cn.mdx +117 -0
  322. package/template/content/docs/versioned-docs.mdx +181 -0
  323. package/template/geistdocs.tsx +51 -0
  324. package/template/hooks/geistdocs/use-sidebar.ts +13 -0
  325. package/template/hooks/use-mobile.ts +19 -0
  326. package/template/lib/geistdocs/config.tsx +27 -0
  327. package/template/lib/geistdocs/fonts.ts +18 -0
  328. package/template/lib/geistdocs/i18n.ts +13 -0
  329. package/template/lib/geistdocs/md-tracking.ts +56 -0
  330. package/template/lib/geistdocs/source.ts +12 -0
  331. package/template/lib/utils.ts +6 -0
  332. package/template/next.config.ts +22 -0
  333. package/template/package.json +63 -0
  334. package/template/postcss.config.mjs +5 -0
  335. package/template/proxy.ts +18 -0
  336. package/template/source.config.ts +62 -0
  337. package/template/tsconfig.json +37 -0
  338. package/dist/index.js +0 -2
  339. /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
@@ -0,0 +1,89 @@
1
+ ---
2
+ title: Feedback
3
+ description: Collect user feedback with an interactive emotion-based widget that creates GitHub Issues
4
+ type: integration
5
+ summary: An interactive feedback widget that collects user sentiment and creates structured GitHub Issues automatically.
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/provider
10
+ - /docs/configuration
11
+ ---
12
+
13
+ The Feedback feature lets readers share page-level feedback through an interactive widget. Feedback is posted to a centralized GitHub repository as issues so your team can track, label, and respond to user input.
14
+
15
+ <CopyPrompt text="Help me configure feedback for this Geistdocs project. Check whether feedback is enabled, what siteId label is used, and how feedback is sent to the Geistdocs platform and GitHub issues.">
16
+ Help me configure feedback for this Geistdocs project. Check whether feedback is enabled, what `siteId` label is used, and how feedback is sent to the Geistdocs platform and GitHub issues.
17
+ </CopyPrompt>
18
+
19
+ ## How it works
20
+
21
+ The feedback widget appears in the table of contents sidebar on every documentation page. When users click "Give feedback", they can:
22
+
23
+ 1. Write their feedback message
24
+ 2. Select an emotion that represents their experience (🤩, 🙂, 😕, 😭)
25
+ 3. Optionally provide their name and email
26
+ 4. Submit their feedback
27
+
28
+ ### Feedback Workflow
29
+
30
+ When feedback is submitted:
31
+
32
+ 1. The feedback is validated against a JSON schema
33
+ 2. A new GitHub Issue is created in the configured feedback repository
34
+ 3. Labels are automatically applied based on the emotion, topic, and other metadata
35
+ 4. User details and metadata are formatted into a structured markdown table
36
+
37
+ Each piece of feedback creates a separate issue, allowing for individual tracking and resolution.
38
+
39
+ ## Feedback Schema
40
+
41
+ The API accepts the following fields:
42
+
43
+ | Field | Type | Required | Max Length | Description |
44
+ | --------- | ------ | -------- | ---------- | ------------------------------------- |
45
+ | `note` | string | Yes | 16,384 | The feedback message |
46
+ | `url` | string | No | 1,024 | Page URL where feedback was submitted |
47
+ | `emotion` | string | No | 1 | Emoji representing user sentiment |
48
+ | `topic` | string | No | 1,024 | Feedback topic/category |
49
+ | `name` | string | No | 1,024 | User's name |
50
+ | `email` | string | No | 1,024 | User's email |
51
+ | `ua` | string | No | 256 | User agent string |
52
+ | `label` | string | No | 64 | Custom label for the issue |
53
+ | `thumbs` | string | No | 4 | Thumbs up/down indicator |
54
+ | `reason` | string | No | 10 | Reason for thumbs down |
55
+ | `plan` | string | No | 10 | User's plan type |
56
+
57
+ Additional fields are captured as metadata and displayed in the issue body.
58
+
59
+ ## Features
60
+
61
+ ### Automatic Labeling
62
+
63
+ Issues are automatically labeled based on:
64
+
65
+ - **Emotion**: `emotion-amazed`, `emotion-happy`, `emotion-sad`, `emotion-cry`
66
+ - **Topic**: `topic-{topic-name}`
67
+ - **Plan**: `{plan}-plan`
68
+ - **Thumbs**: `thumbs-up`, `thumbs-down`
69
+ - **Reason**: `reason-{reason}` (for thumbs down)
70
+ - **Custom labels**: Any label passed via the `label` field
71
+ - **Default labels**: `unresolved`, `vercel-site`
72
+
73
+ ### Structured Issue Body
74
+
75
+ Each issue includes a formatted markdown body with:
76
+
77
+ - The feedback note
78
+ - URL where feedback was submitted
79
+ - User details table (email, context, IP, user agent)
80
+ - Metadata table for any additional fields
81
+
82
+ ### Metadata Support
83
+
84
+ Pass any additional fields in the request body, and they are captured as metadata and displayed in a separate table in the issue. This allows you to include:
85
+
86
+ - User IDs
87
+ - Feature flags
88
+ - Experiment groups
89
+ - Custom tracking data
@@ -0,0 +1,86 @@
1
+ ---
2
+ title: 入门指南
3
+ description: 关于 Geistdocs 的全面入门指南
4
+ type: guide
5
+ summary: 创建新的 Geistdocs 项目、配置环境变量并创建您的第一个文档页面。
6
+ related:
7
+ - /docs/env
8
+ - /docs/syntax
9
+ - /docs/deployment
10
+ ---
11
+
12
+ 本指南将引导您完成设置和自定义文档站点所需的所有内容。
13
+
14
+ ## 先决条件
15
+
16
+ 开始之前,请确保您具备:
17
+
18
+ - **Node.js 18+** 已在您的系统上安装
19
+ - **pnpm**(推荐)或您喜欢的 **npm** 包管理器
20
+ - **GitHub 账户** 用于仓库托管
21
+ - 对 **MDX**、**Next.js** 和 **React** 有基本了解
22
+
23
+ ## 安装
24
+
25
+ ### 1. 创建新项目
26
+
27
+ 使用 Geistdocs CLI 创建新项目:
28
+
29
+ ```bash title="Terminal"
30
+ npx @vercel/geistdocs init
31
+ ```
32
+
33
+ 这将把 Geistdocs 的 `template` 应用克隆到一个新目录。它会提示您输入项目名称,然后安装所有依赖并删除 Geistdocs 网站内容。
34
+
35
+ ### 2. 配置环境变量
36
+
37
+ 复制示例环境文件:
38
+
39
+ ```bash title="Terminal"
40
+ cp .env.example .env.local
41
+ ```
42
+
43
+ 然后编辑 `.env.local` 文件中的环境变量。您可以在 [环境变量](/docs/env) 部分了解有关环境变量的更多信息。
44
+
45
+ ### 3. 启动开发服务器
46
+
47
+ 运行开发服务器:
48
+
49
+ ```bash title="Terminal"
50
+ pnpm dev
51
+ ```
52
+
53
+ 在浏览器中打开 [http://localhost:3000](http://localhost:3000) 来查看您的文档站点。
54
+
55
+ ### 4. 创建新页面
56
+
57
+ 在 `content/docs/` 中创建一个新文件:
58
+
59
+ ````mdx title="content/docs/my-first-page.mdx"
60
+ ---
61
+ title: 我的第一页
62
+ description: 这是我的第一个文档页面
63
+ ---
64
+
65
+ # My First Page
66
+
67
+ Welcome to my documentation! Find this page at `/docs/my-first-page`.
68
+
69
+ ## Features
70
+
71
+ - Easy to write with Markdown
72
+ - Full React component support
73
+ - Automatic navigation generation
74
+
75
+ ## Code Example
76
+
77
+ ```typescript
78
+ const greeting = (name: string): string => {
79
+ return `Hello, ${name}!`;
80
+ };
81
+
82
+ console.log(greeting("World"));
83
+ ```
84
+ ````
85
+
86
+ 在 [语法](/docs/syntax) 部分了解有关可用语法的更多信息。
@@ -0,0 +1,107 @@
1
+ ---
2
+ title: Getting Started
3
+ description: Create a Geistdocs project and start writing documentation
4
+ type: guide
5
+ summary: Create a Geistdocs project, run it locally, and edit your first documentation page.
6
+ related:
7
+ - /docs/configuration
8
+ - /docs/syntax
9
+ - /docs/deployment
10
+ ---
11
+
12
+ Create a Geistdocs site with the package CLI, then edit the generated content and configuration files. The generated project includes these docs so you can use them as a reference while you build.
13
+
14
+ <CopyPrompt text="Create a Geistdocs project with pnpm dlx @vercel/geistdocs init --name my-docs. Then open my-docs, run pnpm dev, and explain which files I should edit first: geistdocs.tsx, content/docs, content/docs/meta.json, and components/geistdocs/mdx-components.tsx.">
15
+ Create a Geistdocs project with `pnpm dlx @vercel/geistdocs init --name my-docs`. Then open `my-docs`, run `pnpm dev`, and explain which files I should edit first: `geistdocs.tsx`, `content/docs`, `content/docs/meta.json`, and `components/geistdocs/mdx-components.tsx`.
16
+ </CopyPrompt>
17
+
18
+ ## Prerequisites
19
+
20
+ Before you begin, install:
21
+
22
+ - Node.js 18 or later
23
+ - pnpm, npm, or another package manager
24
+ - Git
25
+
26
+ ## Create a project
27
+
28
+ Run the Geistdocs CLI from an empty parent folder:
29
+
30
+ ```bash title="Terminal"
31
+ pnpm dlx @vercel/geistdocs init --name my-docs
32
+ ```
33
+
34
+ You can also use npm:
35
+
36
+ ```bash title="Terminal"
37
+ npx @vercel/geistdocs init --name my-docs
38
+ ```
39
+
40
+ The CLI copies the template bundled in the package, rewrites the generated app to depend on the same `@vercel/geistdocs` version, installs dependencies, copies `.env.example` to `.env.local`, and initializes Git.
41
+
42
+ ## Start the development server
43
+
44
+ Open the generated project and start Next.js:
45
+
46
+ ```bash title="Terminal"
47
+ cd my-docs
48
+ pnpm dev
49
+ ```
50
+
51
+ Open `http://localhost:3000` in your browser.
52
+
53
+ ## Edit your first page
54
+
55
+ Docs live in `content/docs`. Edit the overview page:
56
+
57
+ ```mdx title="content/docs/index.mdx"
58
+ ---
59
+ title: Overview
60
+ description: Learn how to use my project.
61
+ ---
62
+
63
+ My project helps developers build with clear documentation.
64
+
65
+ ## Start here
66
+
67
+ Add the first workflow you want readers to complete.
68
+ ```
69
+
70
+ Add more pages by creating new `.mdx` files in `content/docs`.
71
+
72
+ ## Update the sidebar
73
+
74
+ Use `content/docs/meta.json` to control page order and groups:
75
+
76
+ ```json title="content/docs/meta.json"
77
+ {
78
+ "title": "Documentation",
79
+ "root": true,
80
+ "pages": ["index", "getting-started", "---Guides---", "deploy"]
81
+ }
82
+ ```
83
+
84
+ ## Configure the site
85
+
86
+ Use `geistdocs.tsx` to customize the site shell:
87
+
88
+ ```tsx title="geistdocs.tsx"
89
+ export const title = "My Documentation";
90
+
91
+ export const nav = [
92
+ { label: "Docs", href: "/docs" },
93
+ { label: "GitHub", href: "https://github.com/my-org/my-repo" },
94
+ ];
95
+ ```
96
+
97
+ Read [Configuration](/docs/configuration) for the full configuration surface.
98
+
99
+ ## Update Geistdocs
100
+
101
+ For package-based projects, `geistdocs update` updates the `@vercel/geistdocs` package version. It does not overwrite your local content or adapter files.
102
+
103
+ ```bash title="Terminal"
104
+ pnpm exec geistdocs update
105
+ ```
106
+
107
+ Review and test dependency changes before committing.
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: 概述
3
+ description: 了解 Geistdocs 如何将 CLI、运行时和模板打包为文档站点
4
+ type: overview
5
+ summary: Geistdocs 是一个打包的文档系统,用于创建带共享运行时功能的 Next.js 和 Fumadocs 站点。
6
+ related:
7
+ - /docs/getting-started
8
+ - /docs/configuration
9
+ ---
10
+
11
+ Geistdocs 是一个基于 Next.js、Fumadocs 和 Vercel 文档模式的打包文档系统。使用它创建一个本地保存内容、运行时由包管理的文档站点。
12
+
13
+ ## Geistdocs 的工作方式
14
+
15
+ Geistdocs 由三部分组成:
16
+
17
+ - `@vercel/geistdocs`:提供 CLI、运行时组件、route helpers、MDX 组件、页面操作和打包模板的 npm package。
18
+ - 本地 adapter 文件:生成项目中的文件,用于连接配置、内容 source、路由和 UI 自定义。
19
+ - 平台服务:`geistdocs.com` 上的可选翻译、反馈和 Markdown 请求追踪端点。
20
+
21
+ ## 你会编辑的文件
22
+
23
+ 大多数项目从这些文件开始:
24
+
25
+ - `content/docs`:编写和组织文档。
26
+ - `content/docs/meta.json`:控制侧边栏顺序和分组。
27
+ - `geistdocs.tsx`:配置 logo、nav、GitHub 仓库、标题、AI prompt、翻译和功能开关。
28
+ - `components/geistdocs/mdx-components.tsx`:添加或覆盖 MDX 组件。
29
+ - `app/[lang]/docs/[[...slug]]/page.tsx`:配置文档页面行为。
30
+ - `proxy.ts`:在包管理的 Markdown 协商前后添加站点特有的请求逻辑。
31
+
32
+ ## 包负责的内容
33
+
34
+ 包负责文档渲染、页面操作、搜索、Ask AI、Markdown 路由、`llms.txt` 和可复用 MDX 组件等共享行为。更新 `@vercel/geistdocs` 可以获得包级别修复和功能,而不会覆盖你拥有的 adapter 文件。
35
+
36
+ 高级项目可以使用包 API 配置版本化文档、多个内容 source、自定义页面 metadata 和自定义 proxy hooks。
37
+
38
+ ## 包含的功能
39
+
40
+ - MDX 文档和自定义组件
41
+ - `content/docs` 中的本地内容
42
+ - 搜索和 Ask AI
43
+ - 页面操作,包括反馈、复制页面、在 chat 中打开和在 GitHub 编辑
44
+ - 面向 AI 工具的原始 Markdown 路由
45
+ - `llms.txt`
46
+ - 版本化文档和多个内容 source
47
+ - 用于自定义请求逻辑的 proxy hooks
48
+ - RSS feed
49
+ - 国际化路由
50
+ - init、update 和 translate CLI 命令
51
+
52
+ ## 下一步
53
+
54
+ - 阅读 [Getting Started](/docs/getting-started) 创建并运行项目。
55
+ - 阅读 [Configuration](/docs/configuration) 自定义生成的站点。
56
+ - 阅读 [版本化文档](/docs/versioned-docs) 配置多个文档版本。
57
+ - 阅读 [Proxy 和 Markdown 路由](/docs/proxy) 添加自定义请求逻辑。
@@ -0,0 +1,92 @@
1
+ ---
2
+ title: Overview
3
+ description: Learn how Geistdocs packages the CLI, runtime, and template for documentation sites
4
+ type: overview
5
+ summary: Geistdocs is a packaged documentation system for creating Next.js and Fumadocs sites with shared runtime features.
6
+ related:
7
+ - /docs/getting-started
8
+ - /docs/configuration
9
+ ---
10
+
11
+ Geistdocs is a packaged documentation system built with Next.js, Fumadocs, and shared Vercel documentation patterns. Use it to create a docs site with local content files and package-managed runtime features.
12
+
13
+ <CopyPrompt text="Help me understand this Geistdocs project. Explain how the @vercel/geistdocs package, local adapter files, and content/docs folder work together, then suggest the first files I should edit for my documentation site.">
14
+ Help me understand this Geistdocs project. Explain how the `@vercel/geistdocs` package, local adapter files, and `content/docs` folder work together, then suggest the first files I should edit for my documentation site.
15
+ </CopyPrompt>
16
+
17
+ ## How Geistdocs works
18
+
19
+ Geistdocs has three main parts:
20
+
21
+ - `@vercel/geistdocs`: The npm package that provides the CLI, runtime components, route helpers, MDX components, page actions, and bundled template.
22
+ - Local adapter files: The files in your generated project that connect your configuration, content source, routes, and UI customization to the package.
23
+ - Platform services: Hosted endpoints at `geistdocs.com` for optional translation, feedback, and markdown tracking features.
24
+
25
+ ```mermaid
26
+ flowchart TB
27
+ subgraph Package["@vercel/geistdocs package"]
28
+ cli["CLI: init, update, translate"]
29
+ runtime["Runtime: layout, routes, MDX, controls"]
30
+ bundledTemplate["Bundled template snapshot"]
31
+ end
32
+
33
+ subgraph Site["Generated docs site"]
34
+ config["geistdocs.tsx"]
35
+ adapters["app/, components/geistdocs/, lib/geistdocs/"]
36
+ content["content/docs/*.mdx"]
37
+ end
38
+
39
+ subgraph Platform["Geistdocs platform"]
40
+ translate["/translate"]
41
+ feedback["/feedback"]
42
+ tracking["/md-tracking"]
43
+ end
44
+
45
+ cli --> bundledTemplate
46
+ bundledTemplate --> Site
47
+ adapters --> runtime
48
+ content --> adapters
49
+ cli --> translate
50
+ runtime --> feedback
51
+ runtime --> tracking
52
+ ```
53
+
54
+ ## What you edit
55
+
56
+ Most projects start by editing these files:
57
+
58
+ - `content/docs`: Write and organize your docs.
59
+ - `content/docs/meta.json`: Control sidebar order and groups.
60
+ - `geistdocs.tsx`: Configure the logo, nav, GitHub repo, title, AI prompt, translations, and feature flags.
61
+ - `components/geistdocs/mdx-components.tsx`: Add or override MDX components.
62
+ - `app/[lang]/docs/[[...slug]]/page.tsx`: Configure docs page behavior, such as custom render hooks.
63
+ - `proxy.ts`: Add site-specific request logic before or after package-managed markdown negotiation.
64
+
65
+ ## What the package owns
66
+
67
+ The package owns shared behavior such as docs rendering, page actions, search, Ask AI, markdown routes, `llms.txt`, and reusable MDX components. Updating `@vercel/geistdocs` gives your project package-level fixes and features without overwriting user-owned adapter files.
68
+
69
+ Advanced projects can use package APIs for versioned docs, multiple content sources, custom page metadata, and custom proxy hooks while keeping runtime behavior in `@vercel/geistdocs`.
70
+
71
+ ## Included features
72
+
73
+ - MDX documentation with custom components
74
+ - Local content in `content/docs`
75
+ - Search and Ask AI
76
+ - Page actions, including feedback, copy page, open in chat, and edit on GitHub
77
+ - Raw Markdown routes for AI tools
78
+ - `llms.txt`
79
+ - Versioned docs and multiple content sources
80
+ - Proxy hooks for custom request logic
81
+ - RSS feed
82
+ - Theme-aware images
83
+ - Internationalized routes
84
+ - CLI commands for init, update, and translation
85
+
86
+ ## Next steps
87
+
88
+ - Follow [Getting Started](/docs/getting-started) to create and run a project.
89
+ - Read [Configuration](/docs/configuration) to customize the generated site.
90
+ - Read [Versioned docs](/docs/versioned-docs) to configure multiple docs versions.
91
+ - Read [Proxy and markdown routes](/docs/proxy) to add custom request logic.
92
+ - Read [Syntax](/docs/syntax) to write content with MDX components.
@@ -0,0 +1,111 @@
1
+ ---
2
+ title: 国际化
3
+ description: 为您的文档站点添加多语言支持
4
+ type: guide
5
+ summary: 通过 Geistdocs CLI 和 Fumadocs 路由实现多语言文档自动翻译。
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/configuration
10
+ ---
11
+
12
+ Geistdocs 支持开箱即用的国际化 (i18n),使用 Fumadocs 的语言感知路由。您可以通过 Geistdocs CLI 提供多语言文档并使用自动翻译。
13
+
14
+ ## 工作原理
15
+
16
+ i18n 系统使用带有 `[lang]` URL 段的动态路由。默认语言(英语)不会显示在 URL 中,而其他语言会获得前缀:
17
+
18
+ - `/docs/getting-started` - 英语(默认)
19
+ - `/cn/docs/getting-started` - 中文
20
+
21
+ 用户可以使用导航栏中的语言选择器切换语言。
22
+
23
+ ## 翻译内容
24
+
25
+ 使用 Geistdocs CLI 自动翻译您的 MDX 文件:
26
+
27
+ ```bash
28
+ npx @vercel/geistdocs translate
29
+ ```
30
+
31
+ CLI 会从 `geistdocs.tsx` 中读取目标语言并提示您选择要翻译的文件。
32
+
33
+ 翻译由 Geistdocs 平台生成,并与原始文件并存保存在带有区域后缀的文件中(例如,`introduction.cn.mdx`)。
34
+
35
+ ### 命令选项
36
+
37
+ 您可以直接传递选项以跳过交互式提示:
38
+
39
+ ```bash
40
+ # Translate files using the default glob pattern
41
+ npx @vercel/geistdocs translate
42
+
43
+ # Translate files matching a specific glob pattern
44
+ npx @vercel/geistdocs translate "content/docs/**/*.mdx"
45
+
46
+ # Use a custom config file
47
+ npx @vercel/geistdocs translate "content/**/*.mdx" --config custom-config.tsx
48
+ ```
49
+
50
+ | 选项 | 描述 |
51
+ | ----------- | ---------------------------------------------------------- |
52
+ | `--config` | 含有翻译配置的配置文件路径(默认:`geistdocs.tsx`) |
53
+ | `--url` | 自定义翻译 API URL |
54
+
55
+ ### 批量处理
56
+
57
+ 当翻译多个文件时,CLI 会自动将它们分成每组 10 个的批次,以避免速率限制。每个批次完成时都会显示进度。
58
+
59
+ ## 配置
60
+
61
+ 在 `geistdocs.tsx` 中配置支持的语言:
62
+
63
+ ```typescript title="geistdocs.tsx"
64
+ export const translations = {
65
+ en: {
66
+ displayName: "English",
67
+ },
68
+ cn: {
69
+ displayName: "中文",
70
+ search: "搜尋文檔",
71
+ },
72
+ };
73
+ ```
74
+
75
+ `translations` 对象中的第一个区域设置被视为默认/源语言,并且不会作为翻译目标。
76
+
77
+ ### 添加新语言
78
+
79
+ 添加新语言的步骤:
80
+
81
+ 1. 在 `translations` 对象中添加带有语言代码的新键
82
+ 2. 为诸如 `displayName` 和 `search` 之类的 UI 元素添加翻译
83
+ 3. 运行 `npx @vercel/geistdocs translate "content/**/*.mdx"` 以生成翻译内容
84
+
85
+ 语言选择器将自动包含您添加的新语言。
86
+
87
+ ## 内容组织
88
+
89
+ 翻译后的文件与原始文件并存并带有语言后缀保存:
90
+
91
+ ```
92
+ content/docs/
93
+ ├── getting-started.mdx # English (default)
94
+ ├── getting-started.cn.mdx # Chinese
95
+ ├── getting-started.fr.mdx # French
96
+ └── getting-started.es.mdx # Spanish
97
+ ```
98
+
99
+ Fumadocs 会根据 URL 路径自动提供正确的文件。
100
+
101
+ ## 翻译 UI 元素
102
+
103
+ `geistdocs.tsx` 中的 `translations` 对象控制诸如搜索占位符、导航标签和错误消息等 UI 文本。为您支持的每种语言添加相应的翻译。
104
+
105
+ 如果您没有为某个特定元素提供翻译,则会回退到英语。
106
+
107
+ ## 语言检测
108
+
109
+ 语言由 URL 路径确定。不根据浏览器设置进行自动检测——用户必须使用语言选择器显式选择他们的语言。
110
+
111
+ 这种方法为用户提供了完全的控制,并确保他们看到预期的语言。
@@ -0,0 +1,122 @@
1
+ ---
2
+ title: Internationalization
3
+ description: Add multi-language support to your documentation site
4
+ type: guide
5
+ summary: Serve documentation in multiple languages with automatic translation via the Geistdocs CLI and Fumadocs routing.
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/configuration
10
+ ---
11
+
12
+ Geistdocs supports internationalization (i18n) out of the box using Fumadocs' language-aware routing. You can serve documentation in multiple languages with automatic translation via the Geistdocs CLI.
13
+
14
+ <CopyPrompt text="Help me add a new language to this Geistdocs project. Update translations in geistdocs.tsx, run the Geistdocs translate command for content/docs, and explain how localized routes are generated.">
15
+ Help me add a new language to this Geistdocs project. Update `translations` in `geistdocs.tsx`, run the Geistdocs translate command for `content/docs`, and explain how localized routes are generated.
16
+ </CopyPrompt>
17
+
18
+ ## How it works
19
+
20
+ The i18n system uses dynamic routing with a `[lang]` URL segment. The default language (English) doesn't show in URLs, while other languages get a prefix:
21
+
22
+ - `/docs/getting-started` - English (default)
23
+ - `/cn/docs/getting-started` - Chinese
24
+
25
+ Users can switch languages using the language selector in the navigation bar.
26
+
27
+ ## Translating Content
28
+
29
+ Use the Geistdocs CLI to automatically translate your MDX files:
30
+
31
+ ```bash
32
+ pnpm translate
33
+ ```
34
+
35
+ The CLI reads your target locales from `geistdocs.tsx`. If no locales are found in the config, you'll be prompted to enter them manually.
36
+
37
+ Translations are generated using the Geistdocs platform and saved alongside your original file with the locale suffix (e.g., `introduction.cn.mdx`).
38
+
39
+ ### Command Options
40
+
41
+ You can pass options directly to customize the translation behavior:
42
+
43
+ ```bash
44
+ # Translate all MDX files (uses default pattern)
45
+ pnpm translate
46
+
47
+ # Translate files matching a specific glob pattern
48
+ pnpm translate "content/docs/**/*.mdx"
49
+
50
+ # Use a custom config file
51
+ pnpm translate "content/**/*.mdx" --config custom-config.tsx
52
+
53
+ # Use a custom translation API URL
54
+ pnpm translate --url "https://custom-api.example.com/translate"
55
+ ```
56
+
57
+ | Option | Description |
58
+ | ----------- | -------------------------------------------------------- |
59
+ | `--config` | Path to config file with translations (default: `geistdocs.tsx`) |
60
+ | `--url` | Custom translation API URL (can also use `GEISTDOCS_TRANSLATE_URL` env var) |
61
+
62
+ Pass the glob pattern as the command argument. If you omit it, Geistdocs uses `content/docs/**/*.mdx`.
63
+
64
+ The CLI automatically excludes files that already have a locale suffix (e.g., `getting-started.cn.mdx`) to avoid translating already-translated content.
65
+
66
+ ### Batch Processing
67
+
68
+ When translating multiple files, the CLI automatically batches them into groups of 10. Progress is displayed as each batch completes, and a 1-second delay is added between batches to avoid rate limiting.
69
+
70
+ ## Configuration
71
+
72
+ Configure supported languages in `geistdocs.tsx`:
73
+
74
+ ```typescript title="geistdocs.tsx"
75
+ export const translations = {
76
+ en: {
77
+ displayName: "English",
78
+ },
79
+ cn: {
80
+ displayName: "中文",
81
+ search: "搜尋文檔",
82
+ },
83
+ };
84
+ ```
85
+
86
+ The first locale in the `translations` object is treated as your default/source language and is excluded from translation targets.
87
+
88
+ ### Adding a New Language
89
+
90
+ To add a new language:
91
+
92
+ 1. Add a new key to the `translations` object with the language code
93
+ 2. Add translations for UI elements like `displayName` and `search`
94
+ 3. Run `pnpm translate "content/**/*.mdx"` to generate translated content
95
+
96
+ The language selector will automatically include your new language.
97
+
98
+ ## Content Organization
99
+
100
+ Translated files are saved alongside the original with a locale suffix:
101
+
102
+ ```
103
+ content/docs/
104
+ ├── getting-started.mdx # English (default)
105
+ ├── getting-started.cn.mdx # Chinese
106
+ ├── getting-started.fr.mdx # French
107
+ └── getting-started.es.mdx # Spanish
108
+ ```
109
+
110
+ Fumadocs automatically serves the correct file based on the URL path.
111
+
112
+ ## Translating UI Elements
113
+
114
+ The `translations` object in `geistdocs.tsx` controls UI text like search placeholders, navigation labels, and error messages. Add translations for each language you support.
115
+
116
+ If you don't provide a translation for a specific element, it falls back to English.
117
+
118
+ ## Language Detection
119
+
120
+ The language is determined by the URL path. There's no automatic detection based on browser settings - users must explicitly choose their language using the language selector.
121
+
122
+ This approach gives users full control and ensures they see the language they expect.