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

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 (320) hide show
  1. package/dist/cli/index.js +6 -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 +41 -0
  11. package/dist/components/mermaid.d.ts +4 -0
  12. package/dist/components/mermaid.d.ts.map +1 -0
  13. package/dist/components/mermaid.js +44 -0
  14. package/dist/components/theme-aware-image.d.ts +12 -0
  15. package/dist/components/theme-aware-image.d.ts.map +1 -0
  16. package/dist/components/theme-aware-image.js +8 -0
  17. package/dist/components/video.d.ts +6 -0
  18. package/dist/components/video.d.ts.map +1 -0
  19. package/dist/components/video.js +3 -0
  20. package/dist/config.d.ts +52 -0
  21. package/dist/config.d.ts.map +1 -0
  22. package/dist/config.js +1 -0
  23. package/dist/controls.d.ts +15 -0
  24. package/dist/controls.d.ts.map +1 -0
  25. package/dist/controls.js +52 -0
  26. package/dist/internal/chat/context.d.ts +19 -0
  27. package/dist/internal/chat/context.d.ts.map +1 -0
  28. package/dist/internal/chat/context.js +36 -0
  29. package/dist/internal/chat/conversation.d.ts +10 -0
  30. package/dist/internal/chat/conversation.d.ts.map +1 -0
  31. package/dist/internal/chat/conversation.js +16 -0
  32. package/dist/internal/chat/copy-chat.d.ts +5 -0
  33. package/dist/internal/chat/copy-chat.d.ts.map +1 -0
  34. package/dist/internal/chat/copy-chat.js +35 -0
  35. package/dist/internal/chat/db.d.ts +13 -0
  36. package/dist/internal/chat/db.d.ts.map +1 -0
  37. package/dist/internal/chat/db.js +19 -0
  38. package/dist/internal/chat/message-metadata.d.ts +8 -0
  39. package/dist/internal/chat/message-metadata.d.ts.map +1 -0
  40. package/dist/internal/chat/message-metadata.js +29 -0
  41. package/dist/internal/chat/message.d.ts +11 -0
  42. package/dist/internal/chat/message.d.ts.map +1 -0
  43. package/dist/internal/chat/message.js +11 -0
  44. package/dist/internal/chat/prompt-input.d.ts +13 -0
  45. package/dist/internal/chat/prompt-input.d.ts.map +1 -0
  46. package/dist/internal/chat/prompt-input.js +39 -0
  47. package/dist/internal/chat/shell.d.ts +2 -0
  48. package/dist/internal/chat/shell.d.ts.map +1 -0
  49. package/dist/internal/chat/shell.js +194 -0
  50. package/dist/internal/chat/shimmer.d.ts +11 -0
  51. package/dist/internal/chat/shimmer.d.ts.map +1 -0
  52. package/dist/internal/chat/shimmer.js +18 -0
  53. package/dist/internal/chat/sources.d.ts +13 -0
  54. package/dist/internal/chat/sources.d.ts.map +1 -0
  55. package/dist/internal/chat/sources.js +9 -0
  56. package/dist/internal/chat/suggestion.d.ts +11 -0
  57. package/dist/internal/chat/suggestion.d.ts.map +1 -0
  58. package/dist/internal/chat/suggestion.js +12 -0
  59. package/dist/internal/cn.d.ts +3 -0
  60. package/dist/internal/cn.d.ts.map +1 -0
  61. package/dist/internal/cn.js +3 -0
  62. package/dist/internal/feedback-action.d.ts +14 -0
  63. package/dist/internal/feedback-action.d.ts.map +1 -0
  64. package/dist/internal/feedback-action.js +34 -0
  65. package/dist/internal/i18n.d.ts +6 -0
  66. package/dist/internal/i18n.d.ts.map +1 -0
  67. package/dist/internal/i18n.js +18 -0
  68. package/dist/internal/languages.d.ts +7 -0
  69. package/dist/internal/languages.d.ts.map +1 -0
  70. package/dist/internal/languages.js +18 -0
  71. package/dist/internal/not-implemented.d.ts +2 -0
  72. package/dist/internal/not-implemented.d.ts.map +1 -0
  73. package/dist/internal/not-implemented.js +4 -0
  74. package/dist/internal/page-actions-client.d.ts +14 -0
  75. package/dist/internal/page-actions-client.d.ts.map +1 -0
  76. package/dist/internal/page-actions-client.js +154 -0
  77. package/dist/internal/page-actions.d.ts +18 -0
  78. package/dist/internal/page-actions.d.ts.map +1 -0
  79. package/dist/internal/page-actions.js +4 -0
  80. package/dist/internal/search.d.ts +5 -0
  81. package/dist/internal/search.d.ts.map +1 -0
  82. package/dist/internal/search.js +14 -0
  83. package/dist/internal/sidebar.d.ts +6 -0
  84. package/dist/internal/sidebar.d.ts.map +1 -0
  85. package/dist/internal/sidebar.js +37 -0
  86. package/dist/internal/ui/button-group.d.ts +13 -0
  87. package/dist/internal/ui/button-group.d.ts.map +1 -0
  88. package/dist/internal/ui/button-group.js +26 -0
  89. package/dist/internal/ui/button.d.ts +12 -0
  90. package/dist/internal/ui/button.d.ts.map +1 -0
  91. package/dist/internal/ui/button.js +33 -0
  92. package/dist/internal/ui/card.d.ts +6 -0
  93. package/dist/internal/ui/card.d.ts.map +1 -0
  94. package/dist/internal/ui/card.js +14 -0
  95. package/dist/internal/ui/collapsible.d.ts +6 -0
  96. package/dist/internal/ui/collapsible.d.ts.map +1 -0
  97. package/dist/internal/ui/collapsible.js +12 -0
  98. package/dist/internal/ui/drawer.d.ts +6 -0
  99. package/dist/internal/ui/drawer.d.ts.map +1 -0
  100. package/dist/internal/ui/drawer.js +13 -0
  101. package/dist/internal/ui/dropdown-menu.d.ts +22 -0
  102. package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
  103. package/dist/internal/ui/dropdown-menu.js +41 -0
  104. package/dist/internal/ui/input-group.d.ts +15 -0
  105. package/dist/internal/ui/input-group.d.ts.map +1 -0
  106. package/dist/internal/ui/input-group.js +44 -0
  107. package/dist/internal/ui/input.d.ts +3 -0
  108. package/dist/internal/ui/input.d.ts.map +1 -0
  109. package/dist/internal/ui/input.js +5 -0
  110. package/dist/internal/ui/kbd.d.ts +4 -0
  111. package/dist/internal/ui/kbd.d.ts.map +1 -0
  112. package/dist/internal/ui/kbd.js +8 -0
  113. package/dist/internal/ui/popover.d.ts +6 -0
  114. package/dist/internal/ui/popover.d.ts.map +1 -0
  115. package/dist/internal/ui/popover.js +13 -0
  116. package/dist/internal/ui/scroll-area.d.ts +5 -0
  117. package/dist/internal/ui/scroll-area.d.ts.map +1 -0
  118. package/dist/internal/ui/scroll-area.js +12 -0
  119. package/dist/internal/ui/separator.d.ts +4 -0
  120. package/dist/internal/ui/separator.d.ts.map +1 -0
  121. package/dist/internal/ui/separator.js +7 -0
  122. package/dist/internal/ui/sheet.d.ts +10 -0
  123. package/dist/internal/ui/sheet.d.ts.map +1 -0
  124. package/dist/internal/ui/sheet.js +24 -0
  125. package/dist/internal/ui/sonner.d.ts +3 -0
  126. package/dist/internal/ui/sonner.d.ts.map +1 -0
  127. package/dist/internal/ui/sonner.js +20 -0
  128. package/dist/internal/ui/spinner.d.ts +3 -0
  129. package/dist/internal/ui/spinner.d.ts.map +1 -0
  130. package/dist/internal/ui/spinner.js +6 -0
  131. package/dist/internal/ui/textarea.d.ts +3 -0
  132. package/dist/internal/ui/textarea.d.ts.map +1 -0
  133. package/dist/internal/ui/textarea.js +5 -0
  134. package/dist/internal/ui/tooltip.d.ts +7 -0
  135. package/dist/internal/ui/tooltip.d.ts.map +1 -0
  136. package/dist/internal/ui/tooltip.js +16 -0
  137. package/dist/internal/use-mobile.d.ts +2 -0
  138. package/dist/internal/use-mobile.d.ts.map +1 -0
  139. package/dist/internal/use-mobile.js +16 -0
  140. package/dist/layout.d.ts +18 -0
  141. package/dist/layout.d.ts.map +1 -0
  142. package/dist/layout.js +49 -0
  143. package/dist/mdx.d.ts +36 -0
  144. package/dist/mdx.d.ts.map +1 -0
  145. package/dist/mdx.js +72 -0
  146. package/dist/pages/docs.d.ts +55 -0
  147. package/dist/pages/docs.d.ts.map +1 -0
  148. package/dist/pages/docs.js +63 -0
  149. package/dist/proxy.d.ts +21 -0
  150. package/dist/proxy.d.ts.map +1 -0
  151. package/dist/proxy.js +109 -0
  152. package/dist/routes/chat.d.ts +13 -0
  153. package/dist/routes/chat.d.ts.map +1 -0
  154. package/dist/routes/chat.js +229 -0
  155. package/dist/routes/llms.d.ts +33 -0
  156. package/dist/routes/llms.d.ts.map +1 -0
  157. package/dist/routes/llms.js +39 -0
  158. package/dist/routes/search.d.ts +10 -0
  159. package/dist/routes/search.d.ts.map +1 -0
  160. package/dist/routes/search.js +33 -0
  161. package/dist/routes/sitemap.d.ts +35 -0
  162. package/dist/routes/sitemap.d.ts.map +1 -0
  163. package/dist/routes/sitemap.js +150 -0
  164. package/dist/source.d.ts +30 -0
  165. package/dist/source.d.ts.map +1 -0
  166. package/dist/source.js +72 -0
  167. package/package.json +129 -9
  168. package/styles.css +193 -0
  169. package/template/_gitignore +29 -0
  170. package/template/app/[lang]/(home)/components/centered-section.tsx +26 -0
  171. package/template/app/[lang]/(home)/components/cta.tsx +19 -0
  172. package/template/app/[lang]/(home)/components/hero.tsx +27 -0
  173. package/template/app/[lang]/(home)/components/one-two-section.tsx +25 -0
  174. package/template/app/[lang]/(home)/components/templates.tsx +50 -0
  175. package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
  176. package/template/app/[lang]/(home)/layout.tsx +14 -0
  177. package/template/app/[lang]/(home)/page.tsx +126 -0
  178. package/template/app/[lang]/docs/[[...slug]]/page.tsx +19 -0
  179. package/template/app/[lang]/docs/layout.tsx +14 -0
  180. package/template/app/[lang]/layout.tsx +29 -0
  181. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
  182. package/template/app/[lang]/llms.txt/route.ts +6 -0
  183. package/template/app/[lang]/og/[...slug]/background.png +0 -0
  184. package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
  185. package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
  186. package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
  187. package/template/app/[lang]/rss.xml/route.ts +52 -0
  188. package/template/app/[lang]/sitemap.md/route.ts +9 -0
  189. package/template/app/actions/feedback/emotions.ts +18 -0
  190. package/template/app/actions/feedback/index.ts +45 -0
  191. package/template/app/api/chat/route.ts +8 -0
  192. package/template/app/api/search/route.ts +5 -0
  193. package/template/app/favicon.ico +0 -0
  194. package/template/app/global.css +2 -0
  195. package/template/app/robots.ts +14 -0
  196. package/template/app/sitemap.ts +36 -0
  197. package/template/app/styles/geistdocs.css +553 -0
  198. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +35 -0
  199. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +27 -0
  200. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +27 -0
  201. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +30 -0
  202. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +27 -0
  203. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +27 -0
  204. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +25 -0
  205. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +27 -0
  206. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +36 -0
  207. package/template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx +11 -0
  208. package/template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx +14 -0
  209. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +29 -0
  210. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +38 -0
  211. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +42 -0
  212. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +42 -0
  213. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +31 -0
  214. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +29 -0
  215. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +24 -0
  216. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +73 -0
  217. package/template/components/geistdocs/callout.tsx +40 -0
  218. package/template/components/geistdocs/chat.tsx +24 -0
  219. package/template/components/geistdocs/code-block-tabs.tsx +61 -0
  220. package/template/components/geistdocs/code-block.tsx +134 -0
  221. package/template/components/geistdocs/copy-page.tsx +27 -0
  222. package/template/components/geistdocs/desktop-menu.tsx +52 -0
  223. package/template/components/geistdocs/docs-layout.tsx +20 -0
  224. package/template/components/geistdocs/docs-page.tsx +35 -0
  225. package/template/components/geistdocs/edit-source.tsx +30 -0
  226. package/template/components/geistdocs/feedback.tsx +139 -0
  227. package/template/components/geistdocs/footer.tsx +30 -0
  228. package/template/components/geistdocs/github-button.tsx +19 -0
  229. package/template/components/geistdocs/home-layout.tsx +46 -0
  230. package/template/components/geistdocs/icons.tsx +13 -0
  231. package/template/components/geistdocs/installer.tsx +58 -0
  232. package/template/components/geistdocs/language-selector.tsx +3 -0
  233. package/template/components/geistdocs/mdx-components.tsx +5 -0
  234. package/template/components/geistdocs/mermaid.tsx +68 -0
  235. package/template/components/geistdocs/mobile-docs-bar.tsx +81 -0
  236. package/template/components/geistdocs/mobile-menu.tsx +150 -0
  237. package/template/components/geistdocs/navbar-logo.tsx +124 -0
  238. package/template/components/geistdocs/navbar.tsx +22 -0
  239. package/template/components/geistdocs/provider.tsx +31 -0
  240. package/template/components/geistdocs/rss-button.tsx +10 -0
  241. package/template/components/geistdocs/scroll-top.tsx +21 -0
  242. package/template/components/geistdocs/search.tsx +17 -0
  243. package/template/components/geistdocs/sidebar.tsx +128 -0
  244. package/template/components/geistdocs/theme-aware-image.tsx +22 -0
  245. package/template/components/geistdocs/theme-toggle.tsx +3 -0
  246. package/template/components/geistdocs/video.tsx +16 -0
  247. package/template/components/ui/badge.tsx +46 -0
  248. package/template/components/ui/button-group.tsx +83 -0
  249. package/template/components/ui/button.tsx +60 -0
  250. package/template/components/ui/card.tsx +92 -0
  251. package/template/components/ui/collapsible.tsx +33 -0
  252. package/template/components/ui/command-prompt.tsx +488 -0
  253. package/template/components/ui/command.tsx +184 -0
  254. package/template/components/ui/dialog.tsx +143 -0
  255. package/template/components/ui/drawer.tsx +135 -0
  256. package/template/components/ui/dropdown-menu.tsx +257 -0
  257. package/template/components/ui/hover-card.tsx +44 -0
  258. package/template/components/ui/input-group.tsx +170 -0
  259. package/template/components/ui/input.tsx +21 -0
  260. package/template/components/ui/kbd.tsx +28 -0
  261. package/template/components/ui/navigation-menu.tsx +192 -0
  262. package/template/components/ui/popover.tsx +48 -0
  263. package/template/components/ui/scroll-area.tsx +58 -0
  264. package/template/components/ui/select.tsx +187 -0
  265. package/template/components/ui/separator.tsx +28 -0
  266. package/template/components/ui/sheet.tsx +139 -0
  267. package/template/components/ui/sonner.tsx +40 -0
  268. package/template/components/ui/spinner.tsx +16 -0
  269. package/template/components/ui/textarea.tsx +18 -0
  270. package/template/components/ui/tooltip.tsx +61 -0
  271. package/template/components.json +22 -0
  272. package/template/content/docs/ask-ai.cn.mdx +85 -0
  273. package/template/content/docs/ask-ai.mdx +85 -0
  274. package/template/content/docs/configuration.cn.mdx +115 -0
  275. package/template/content/docs/configuration.mdx +115 -0
  276. package/template/content/docs/deployment.cn.mdx +34 -0
  277. package/template/content/docs/deployment.mdx +34 -0
  278. package/template/content/docs/edit-on-github.cn.mdx +47 -0
  279. package/template/content/docs/edit-on-github.mdx +47 -0
  280. package/template/content/docs/env.cn.mdx +25 -0
  281. package/template/content/docs/env.mdx +25 -0
  282. package/template/content/docs/feedback.cn.mdx +85 -0
  283. package/template/content/docs/feedback.mdx +85 -0
  284. package/template/content/docs/getting-started.cn.mdx +86 -0
  285. package/template/content/docs/getting-started.mdx +86 -0
  286. package/template/content/docs/index.cn.mdx +54 -0
  287. package/template/content/docs/index.mdx +87 -0
  288. package/template/content/docs/internationalization.cn.mdx +113 -0
  289. package/template/content/docs/internationalization.mdx +117 -0
  290. package/template/content/docs/llms-txt.cn.mdx +50 -0
  291. package/template/content/docs/llms-txt.mdx +50 -0
  292. package/template/content/docs/md.cn.mdx +68 -0
  293. package/template/content/docs/md.mdx +68 -0
  294. package/template/content/docs/meta.json +21 -0
  295. package/template/content/docs/open-in-chat.cn.mdx +78 -0
  296. package/template/content/docs/open-in-chat.mdx +78 -0
  297. package/template/content/docs/provider.cn.mdx +69 -0
  298. package/template/content/docs/provider.mdx +69 -0
  299. package/template/content/docs/rss.cn.mdx +104 -0
  300. package/template/content/docs/rss.mdx +104 -0
  301. package/template/content/docs/syntax.cn.mdx +416 -0
  302. package/template/content/docs/syntax.mdx +407 -0
  303. package/template/content/docs/theme-aware-image.mdx +53 -0
  304. package/template/geistdocs.tsx +51 -0
  305. package/template/hooks/geistdocs/use-sidebar.ts +13 -0
  306. package/template/hooks/use-mobile.ts +19 -0
  307. package/template/lib/geistdocs/config.tsx +27 -0
  308. package/template/lib/geistdocs/fonts.ts +18 -0
  309. package/template/lib/geistdocs/i18n.ts +13 -0
  310. package/template/lib/geistdocs/md-tracking.ts +56 -0
  311. package/template/lib/geistdocs/source.ts +12 -0
  312. package/template/lib/utils.ts +6 -0
  313. package/template/next.config.ts +22 -0
  314. package/template/package.json +63 -0
  315. package/template/postcss.config.mjs +5 -0
  316. package/template/proxy.ts +16 -0
  317. package/template/source.config.ts +62 -0
  318. package/template/tsconfig.json +37 -0
  319. package/dist/index.js +0 -2
  320. /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
@@ -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! This page will be available 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,86 @@
1
+ ---
2
+ title: Getting Started
3
+ description: A comprehensive guide to getting started with Geistdocs
4
+ type: guide
5
+ summary: Set up a new Geistdocs project, configure environment variables, and create your first documentation page.
6
+ related:
7
+ - /docs/env
8
+ - /docs/syntax
9
+ - /docs/deployment
10
+ ---
11
+
12
+ This guide will walk you through everything you need to know to set up and customize your documentation site.
13
+
14
+ ## Prerequisites
15
+
16
+ Before you begin, make sure you have:
17
+
18
+ - **Node.js 18+** installed on your system
19
+ - **pnpm** (recommended) or your favorite npm package manager
20
+ - A **GitHub account** for repository hosting
21
+ - Basic familiarity with **MDX**, **Next.js**, and **React**
22
+
23
+ ## Installation
24
+
25
+ ### 1. Create a New Project
26
+
27
+ Create a new project using the Geistdocs CLI:
28
+
29
+ ```bash title="Terminal"
30
+ npx @vercel/geistdocs init
31
+ ```
32
+
33
+ This will clone the Geistdocs `template` app into a new directory. It will prompt you for a project name, then install all dependencies and delete the Geistdocs website content.
34
+
35
+ ### 2. Configure Environment Variables
36
+
37
+ Copy the example environment file:
38
+
39
+ ```bash title="Terminal"
40
+ cp .env.example .env.local
41
+ ```
42
+
43
+ Then edit the environment variables in the `.env.local` file. You can learn more about the environment variables in the [Environment Variables](/docs/env) section.
44
+
45
+ ### 3. Start Development Server
46
+
47
+ Run the development server:
48
+
49
+ ```bash title="Terminal"
50
+ pnpm dev
51
+ ```
52
+
53
+ Open [http://localhost:3000](http://localhost:3000) in your browser to see your documentation site.
54
+
55
+ ### 4. Create a New Page
56
+
57
+ Create a new file in `content/docs/`:
58
+
59
+ ````mdx title="content/docs/my-first-page.mdx"
60
+ ---
61
+ title: My First Page
62
+ description: This is my first documentation page
63
+ ---
64
+
65
+ # My First Page
66
+
67
+ Welcome to my documentation! This page will be available 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
+ Learn more about the available syntax in the [Syntax](/docs/syntax) section.
@@ -0,0 +1,54 @@
1
+ ---
2
+ title: 概述
3
+ description: 用于快速且一致地搭建 Vercel 文档微站点的现代文档模板
4
+ type: overview
5
+ summary: 基于 Next.js 和 Fumadocs 构建的生产就绪文档模板,用于创建一致的文档微站点。
6
+ related:
7
+ - /docs/getting-started
8
+ - /docs/configuration
9
+ ---
10
+
11
+ Geistdocs 是一个生产就绪的文档模板,基于 Next.js 16 和 Fumadocs 构建。它被设计为 Vercel 的内部模板,用于在各个项目中创建具有一致外观、体验和功能集的文档微站点。
12
+
13
+ ## 概述
14
+
15
+ 该模板提供了构建美观且功能齐全的文档站点所需的一切,且只需最少的设置。它将用于内容创作的 MDX 的强大功能与诸如 AI 驱动的聊天、GitHub Discussions 集成和高级搜索功能等现代特性相结合。
16
+
17
+ ## 使用场景
18
+
19
+ 该模板非常适合:
20
+
21
+ - **产品文档** - 功能指南、教程和参考
22
+ - **API 文档** - 带代码示例的接口文档
23
+ - **开发者工具** - CLI 工具、SDK 和框架文档
24
+ - **内部维基** - 团队知识库和指南
25
+ - **项目文档** - 开源项目文档
26
+
27
+ ## 包含内容
28
+
29
+ Geistdocs 由三部分组成:
30
+
31
+ - `template` - 你将用来创建文档站点的模板。
32
+ - `platform` - 你的文档站点将用于处理反馈和翻译的后端。
33
+ - `cli` - 用于创建和管理文档站点的 CLI。
34
+
35
+ ```mermaid
36
+ graph TD
37
+ root[geistdocs/]
38
+
39
+ root --> apps[apps/]
40
+ root --> packages[packages/]
41
+
42
+ apps --> template[template/]
43
+ apps --> platform[platform/]
44
+
45
+ packages --> cli[cli]
46
+ ```
47
+
48
+ ## 支持
49
+
50
+ 如遇问题、有疑问或想贡献:
51
+
52
+ - 查看文档页面以获取详细指南
53
+ - 使用内置反馈小部件报告问题
54
+ - 使用 AI 聊天助手提问
@@ -0,0 +1,87 @@
1
+ ---
2
+ title: Overview
3
+ description: A modern documentation template for spinning up Vercel documentation microsites quickly and consistently
4
+ type: overview
5
+ summary: A production-ready documentation template built with Next.js and Fumadocs for creating consistent documentation microsites.
6
+ related:
7
+ - /docs/getting-started
8
+ - /docs/configuration
9
+ ---
10
+
11
+ Geistdocs is a production-ready documentation template built with Next.js 16 and Fumadocs. It's designed as an internal Vercel template for creating documentation microsites with a consistent look, feel, and feature set across projects.
12
+
13
+ ## Overview
14
+
15
+ This template provides everything you need to build beautiful, functional documentation sites with minimal setup. It combines the power of MDX for content authoring with modern features like AI-powered chat, GitHub Discussions integration, and advanced search capabilities.
16
+
17
+ ## Use Cases
18
+
19
+ This template is ideal for:
20
+
21
+ - **Product documentation** - Feature guides, tutorials, and references
22
+ - **API documentation** - Endpoint documentation with code examples
23
+ - **Developer tools** - CLI tools, SDKs, and framework documentation
24
+ - **Internal wikis** - Team knowledge bases and guides
25
+ - **Project documentation** - Open source project documentation
26
+
27
+ ## What's Included
28
+
29
+ Geistdocs is comprised of three main parts:
30
+
31
+ - `template` - The template you'll use to create your docs site.
32
+ - `platform` - The backend your docs site will use to handle feedback and translations.
33
+ - `cli` - The CLI for creating and managing your docs site.
34
+
35
+ ```mermaid
36
+ flowchart TB
37
+ subgraph User["Developer Workflow"]
38
+ init["npx @vercel/geistdocs init"]
39
+ translate["npx @vercel/geistdocs translate"]
40
+ docs["Your Docs Site"]
41
+ end
42
+
43
+ subgraph CLI["packages/cli"]
44
+ initCmd["init command"]
45
+ translateCmd["translate command"]
46
+ end
47
+
48
+ subgraph Template["apps/template"]
49
+ content["content/docs/*.mdx"]
50
+ localeContent["content/docs/*.locale.mdx"]
51
+ config["geistdocs.tsx\n(locale config)"]
52
+ feedback["Feedback Component"]
53
+ end
54
+
55
+ subgraph Platform["apps/platform"]
56
+ translateAPI["/translate API"]
57
+ feedbackAPI["/feedback API"]
58
+ end
59
+
60
+ subgraph External["External Services"]
61
+ aigateway["Vercel AI Gateway"]
62
+ github["vercel/feedback\n(GitHub Issues)"]
63
+ end
64
+
65
+ init --> initCmd
66
+ initCmd -->|"Downloads template"| Template
67
+
68
+ translate --> translateCmd
69
+ translateCmd -->|"Reads locales from"| config
70
+ translateCmd -->|"Reads source files"| content
71
+ translateCmd -->|"POST /translate"| translateAPI
72
+ translateAPI --> aigateway
73
+ translateAPI -->|"Returns translations"| translateCmd
74
+ translateCmd -->|"Writes translated files"| localeContent
75
+
76
+ docs --> feedback
77
+ feedback -->|"POST /feedback"| feedbackAPI
78
+ feedbackAPI -->|"Creates issue"| github
79
+ ```
80
+
81
+ ## Support
82
+
83
+ For issues, questions, or contributions:
84
+
85
+ - Check the documentation pages for detailed guides
86
+ - Use the built-in feedback widget to report issues
87
+ - Ask questions using the AI chat assistant
@@ -0,0 +1,113 @@
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 a single file
41
+ npx @vercel/geistdocs translate --file content/docs/getting-started.mdx
42
+
43
+ # Translate multiple files using a glob pattern
44
+ npx @vercel/geistdocs translate --pattern "content/docs/**/*.mdx"
45
+
46
+ # Use a custom config file
47
+ npx @vercel/geistdocs translate --pattern "content/**/*.mdx" --config custom-config.tsx
48
+ ```
49
+
50
+ | 选项 | 描述 |
51
+ | ----------- | ---------------------------------------------------------- |
52
+ | `--file` | 要翻译的单个 MDX 文件的路径 |
53
+ | `--pattern` | 匹配多个 MDX 文件的 glob 模式 |
54
+ | `--config` | 含有翻译配置的配置文件路径(默认:`geistdocs.tsx`) |
55
+ | `--url` | 自定义翻译 API URL |
56
+
57
+ ### 批量处理
58
+
59
+ 当翻译多个文件时,CLI 会自动将它们分成每组 10 个的批次,以避免速率限制。每个批次完成时都会显示进度。
60
+
61
+ ## 配置
62
+
63
+ 在 `geistdocs.tsx` 中配置支持的语言:
64
+
65
+ ```typescript title="geistdocs.tsx"
66
+ export const translations = {
67
+ en: {
68
+ displayName: "English",
69
+ },
70
+ cn: {
71
+ displayName: "中文",
72
+ search: "搜尋文檔",
73
+ },
74
+ };
75
+ ```
76
+
77
+ `translations` 对象中的第一个区域设置被视为默认/源语言,并且不会作为翻译目标。
78
+
79
+ ### 添加新语言
80
+
81
+ 添加新语言的步骤:
82
+
83
+ 1. 在 `translations` 对象中添加带有语言代码的新键
84
+ 2. 为诸如 `displayName` 和 `search` 之类的 UI 元素添加翻译
85
+ 3. 运行 `npx @vercel/geistdocs translate --pattern "content/**/*.mdx"` 以生成翻译内容
86
+
87
+ 语言选择器将自动包含您添加的新语言。
88
+
89
+ ## 内容组织
90
+
91
+ 翻译后的文件与原始文件并存并带有语言后缀保存:
92
+
93
+ ```
94
+ content/docs/
95
+ ├── getting-started.mdx # English (default)
96
+ ├── getting-started.cn.mdx # Chinese
97
+ ├── getting-started.fr.mdx # French
98
+ └── getting-started.es.mdx # Spanish
99
+ ```
100
+
101
+ Fumadocs 会根据 URL 路径自动提供正确的文件。
102
+
103
+ ## 翻译 UI 元素
104
+
105
+ `geistdocs.tsx` 中的 `translations` 对象控制诸如搜索占位符、导航标签和错误消息等 UI 文本。为您支持的每种语言添加相应的翻译。
106
+
107
+ 如果您没有为某个特定元素提供翻译,则会回退到英语。
108
+
109
+ ## 语言检测
110
+
111
+ 语言由 URL 路径确定。不根据浏览器设置进行自动检测——用户必须使用语言选择器显式选择他们的语言。
112
+
113
+ 这种方法为用户提供了完全的控制,并确保他们看到预期的语言。
@@ -0,0 +1,117 @@
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
+ ## How It Works
15
+
16
+ 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:
17
+
18
+ - `/docs/getting-started` - English (default)
19
+ - `/cn/docs/getting-started` - Chinese
20
+
21
+ Users can switch languages using the language selector in the navigation bar.
22
+
23
+ ## Translating Content
24
+
25
+ Use the Geistdocs CLI to automatically translate your MDX files:
26
+
27
+ ```bash
28
+ pnpm translate
29
+ ```
30
+
31
+ 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.
32
+
33
+ Translations are generated using the Geistdocs platform and saved alongside your original file with the locale suffix (e.g., `introduction.cn.mdx`).
34
+
35
+ ### Command Options
36
+
37
+ You can pass options directly to customize the translation behavior:
38
+
39
+ ```bash
40
+ # Translate all MDX files (uses default pattern)
41
+ pnpm translate
42
+
43
+ # Translate files matching a specific glob pattern
44
+ pnpm translate --pattern "content/docs/**/*.mdx"
45
+
46
+ # Use a custom config file
47
+ pnpm translate --pattern "content/**/*.mdx" --config custom-config.tsx
48
+
49
+ # Use a custom translation API URL
50
+ pnpm translate --url "https://custom-api.example.com/translate"
51
+ ```
52
+
53
+ | Option | Description |
54
+ | ----------- | -------------------------------------------------------- |
55
+ | `--pattern` | Glob pattern to match MDX files (default: `content/docs/**/*.mdx`) |
56
+ | `--config` | Path to config file with translations (default: `geistdocs.tsx`) |
57
+ | `--url` | Custom translation API URL (can also use `GEISTDOCS_TRANSLATE_URL` env var) |
58
+
59
+ The CLI automatically excludes files that already have a locale suffix (e.g., `getting-started.cn.mdx`) to avoid translating already-translated content.
60
+
61
+ ### Batch Processing
62
+
63
+ 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.
64
+
65
+ ## Configuration
66
+
67
+ Configure supported languages in `geistdocs.tsx`:
68
+
69
+ ```typescript title="geistdocs.tsx"
70
+ export const translations = {
71
+ en: {
72
+ displayName: "English",
73
+ },
74
+ cn: {
75
+ displayName: "中文",
76
+ search: "搜尋文檔",
77
+ },
78
+ };
79
+ ```
80
+
81
+ The first locale in the `translations` object is treated as your default/source language and is excluded from translation targets.
82
+
83
+ ### Adding a New Language
84
+
85
+ To add a new language:
86
+
87
+ 1. Add a new key to the `translations` object with the language code
88
+ 2. Add translations for UI elements like `displayName` and `search`
89
+ 3. Run `pnpm translate --pattern "content/**/*.mdx"` to generate translated content
90
+
91
+ The language selector will automatically include your new language.
92
+
93
+ ## Content Organization
94
+
95
+ Translated files are saved alongside the original with a locale suffix:
96
+
97
+ ```
98
+ content/docs/
99
+ ├── getting-started.mdx # English (default)
100
+ ├── getting-started.cn.mdx # Chinese
101
+ ├── getting-started.fr.mdx # French
102
+ └── getting-started.es.mdx # Spanish
103
+ ```
104
+
105
+ Fumadocs automatically serves the correct file based on the URL path.
106
+
107
+ ## Translating UI Elements
108
+
109
+ The `translations` object in `geistdocs.tsx` controls UI text like search placeholders, navigation labels, and error messages. Add translations for each language you support.
110
+
111
+ If you don't provide a translation for a specific element, it falls back to English.
112
+
113
+ ## Language Detection
114
+
115
+ 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.
116
+
117
+ This approach gives users full control and ensures they see the language they expect.
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: llms.txt
3
+ description: 一个包含您所有文档的纯文本单文件,供 AI 使用
4
+ type: conceptual
5
+ summary: 遵循 llms.txt 标准,将所有文档以纯 Markdown 文本形式返回的单一端点。
6
+ related:
7
+ - /docs/md
8
+ - /docs/ask-ai
9
+ ---
10
+
11
+ Geistdocs 实现了 [llms.txt 标准](https://llmstxt.org/) —— 一种约定,将您所有的文档内容提供为单个、AI 可读的文本文件。这使得语言模型可以一次性轻松理解您的完整文档。
12
+
13
+ ## 它是什么
14
+
15
+ `/llms.txt` 端点以单次响应返回您所有的文档页面,格式为纯 Markdown。每个页面之间用空行分隔,便于 AI 工具解析和理解您的完整文档。
16
+
17
+ ### 访问
18
+
19
+ ```
20
+ https://yourdomain.com/llms.txt
21
+ ```
22
+
23
+ 将所有文档页面串联为纯文本返回。
24
+
25
+ ## 工作原理
26
+
27
+ 该端点会:
28
+
29
+ 1. 从您的文档中获取所有页面
30
+ 2. 处理每个页面以提取干净的 Markdown
31
+ 3. 将所有内容合并为单个文本文件
32
+ 4. 以 `text/plain` 返回
33
+
34
+ 页面之间使用双换行符 (`\n\n`) 连接以便清晰分隔。
35
+
36
+ ## 使用场景
37
+
38
+ 此功能可用于:
39
+
40
+ - **AI 训练** - 将您的文档作为 AI 助手的上下文
41
+ - **搜索索引** - 将您完整的文档提供给搜索系统
42
+ - **内容分析** - 分析跨文档的模式和内容
43
+ - **批量处理** - 一次处理所有文档
44
+ - **LLM 上下文** - 为语言模型提供完整的文档上下文
45
+
46
+ ## llms.txt 标准
47
+
48
+ llms.txt 标准是一种简单的约定,使文档对 AI 工具更易访问。它在精神上类似于 `robots.txt`,但设计目标是面向语言模型而非搜索爬虫。
49
+
50
+ 在 [llmstxt.org](https://llmstxt.org/) 了解更多。
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: llms.txt
3
+ description: A single file containing all your documentation in plain text for AI consumption
4
+ type: conceptual
5
+ summary: A single endpoint that returns all documentation as plain Markdown text following the llms.txt standard.
6
+ related:
7
+ - /docs/md
8
+ - /docs/ask-ai
9
+ ---
10
+
11
+ Geistdocs implements the [llms.txt standard](https://llmstxt.org/) - a convention that provides all your documentation content in a single, AI-readable text file. This makes it easy for language models to understand your entire documentation at once.
12
+
13
+ ## What It Is
14
+
15
+ The `/llms.txt` endpoint returns all your documentation pages as plain Markdown in a single response. Each page is separated by blank lines, making it easy for AI tools to parse and understand your complete documentation.
16
+
17
+ ### Access
18
+
19
+ ```
20
+ https://yourdomain.com/llms.txt
21
+ ```
22
+
23
+ Returns all documentation pages concatenated together as plain text.
24
+
25
+ ## How It Works
26
+
27
+ The endpoint:
28
+
29
+ 1. Fetches all pages from your documentation
30
+ 2. Processes each page to extract clean Markdown
31
+ 3. Combines everything into a single text file
32
+ 4. Returns it as `text/plain`
33
+
34
+ Pages are joined with double newlines (`\n\n`) for clear separation.
35
+
36
+ ## Use Cases
37
+
38
+ This feature enables:
39
+
40
+ - **AI Training** - Provide your docs as context for AI assistants
41
+ - **Search Indexing** - Feed your entire documentation to search systems
42
+ - **Content Analysis** - Analyze patterns and content across all docs
43
+ - **Bulk Processing** - Process all documentation at once
44
+ - **LLM Context** - Give language models complete documentation context
45
+
46
+ ## The llms.txt Standard
47
+
48
+ The llms.txt standard is a simple convention that makes documentation more accessible to AI tools. It's similar in spirit to `robots.txt` but designed for language models instead of search crawlers.
49
+
50
+ Learn more at [llmstxt.org](https://llmstxt.org/)