@vercel/geistdocs 1.2.1 → 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,155 @@
1
+ ---
2
+ title: 配置
3
+ description: 通过本地 adapter 文件和包 API 配置 Geistdocs 站点
4
+ type: reference
5
+ summary: 配置站点 metadata、导航、AI 功能、页面操作、翻译和本地 adapters。
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/provider
10
+ - /docs/env
11
+ - /docs/versioned-docs
12
+ - /docs/proxy
13
+ ---
14
+
15
+ 通过生成项目中你拥有的文件配置 Geistdocs。运行时功能来自 `@vercel/geistdocs`,本地文件控制内容、品牌、路由 adapters 和可选自定义。
16
+
17
+ ## 配置文件
18
+
19
+ | File | Purpose |
20
+ | --- | --- |
21
+ | `geistdocs.tsx` | 站点级设置,包括 logo、nav、GitHub 仓库、AI prompt、翻译和功能开关。 |
22
+ | `lib/geistdocs/config.tsx` | 使用 `defineConfig` 将 `geistdocs.tsx` exports 转换为包配置。 |
23
+ | `lib/geistdocs/source.ts` | 将 Fumadocs content collections 连接到包 source adapter。 |
24
+ | `components/geistdocs/mdx-components.tsx` | 添加或覆盖 MDX 组件。 |
25
+ | `app/[lang]/docs/[[...slug]]/page.tsx` | 配置包提供的 docs page renderer。 |
26
+ | `proxy.ts` | 配置 Markdown 协商、AI-agent 重写、请求追踪和自定义 request hooks。 |
27
+ | `content/docs/meta.json` | 控制侧边栏顺序和分组标签。 |
28
+
29
+ ## `geistdocs.tsx`
30
+
31
+ 项目根目录下的 `geistdocs.tsx` 文件包含主要自定义选项:
32
+
33
+ ```tsx title="geistdocs.tsx"
34
+ import { BookHeartIcon } from "lucide-react";
35
+
36
+ export const Logo = () => (
37
+ <div className="flex items-center gap-2">
38
+ <BookHeartIcon className="size-5" />
39
+ <p className="font-semibold text-xl tracking-tight">Geistdocs</p>
40
+ </div>
41
+ );
42
+
43
+ export const nav = [
44
+ {
45
+ label: "Docs",
46
+ href: "/docs",
47
+ },
48
+ ];
49
+
50
+ export const suggestions = [
51
+ "What is Vercel?",
52
+ "What can I deploy with Vercel?",
53
+ "What is Fluid Compute?",
54
+ "How much does Vercel cost?",
55
+ ];
56
+
57
+ export const title = "Geistdocs Documentation";
58
+
59
+ export const prompt =
60
+ "You are a helpful assistant specializing in answering questions about Geistdocs, a modern documentation template built with Next.js and Fumadocs.";
61
+ ```
62
+
63
+ ## 配置选项
64
+
65
+ ### `Logo`
66
+
67
+ 自定义显示在站点页眉中的徽标组件:
68
+
69
+ ```tsx title="geistdocs.tsx"
70
+ export const Logo = () => (
71
+ <div className="flex items-center gap-2">
72
+ <YourIcon className="size-5" />
73
+ <p className="font-semibold text-xl tracking-tight">Your Brand</p>
74
+ </div>
75
+ );
76
+ ```
77
+
78
+ ### `nav`
79
+
80
+ 定义显示在页眉中的导航链接:
81
+
82
+ ```tsx title="geistdocs.tsx"
83
+ export const nav = [
84
+ {
85
+ label: "Documentation",
86
+ href: "/docs",
87
+ },
88
+ {
89
+ label: "API Reference",
90
+ href: "/api",
91
+ },
92
+ {
93
+ label: "GitHub",
94
+ href: "https://github.com/your-org/your-repo",
95
+ },
96
+ ];
97
+ ```
98
+
99
+ ### `suggestions`
100
+
101
+ 为 AI 助手配置建议的问题:
102
+
103
+ ```tsx title="geistdocs.tsx"
104
+ export const suggestions = [
105
+ "How do I get started?",
106
+ "What are the key features?",
107
+ "How do I deploy my site?",
108
+ "Where can I get help?",
109
+ ];
110
+ ```
111
+
112
+ ### `title`
113
+
114
+ 设置文档站点的主标题:
115
+
116
+ ```tsx title="geistdocs.tsx"
117
+ export const title = "Your Product Documentation";
118
+ ```
119
+
120
+ ### `prompt`
121
+
122
+ 自定义 AI 助手的系统提示,以匹配您的文档上下文:
123
+
124
+ ```tsx title="geistdocs.tsx"
125
+ export const prompt =
126
+ "You are a helpful assistant specializing in answering questions about Your Product, a platform for building amazing applications.";
127
+ ```
128
+
129
+ ## 高级配置
130
+
131
+ `lib/geistdocs/config.tsx` 可以添加 `content` 和 `versions` metadata,让本地 adapters 和自定义 UI 共用同一个配置对象:
132
+
133
+ ```tsx title="lib/geistdocs/config.tsx"
134
+ export const config = defineConfig({
135
+ // ...
136
+ content: [
137
+ { id: "docs", label: "Docs", dir: "content/docs", route: "/docs" },
138
+ {
139
+ id: "cookbook",
140
+ label: "Cookbook",
141
+ dir: "content/cookbook",
142
+ route: "/cookbook",
143
+ },
144
+ ],
145
+ versions: {
146
+ current: "v6",
147
+ items: [
148
+ { id: "v6", label: "v6 latest" },
149
+ { id: "v5", label: "v5", href: "https://v5.example.com/:path*" },
150
+ ],
151
+ },
152
+ });
153
+ ```
154
+
155
+ 阅读 [版本化文档](/docs/versioned-docs) 配置 versioned sources,阅读 [Proxy 和 Markdown 路由](/docs/proxy) 配置 route mappings。
@@ -0,0 +1,200 @@
1
+ ---
2
+ title: Configuration
3
+ description: Configure a Geistdocs site through local adapter files and package APIs
4
+ type: reference
5
+ summary: Configure site metadata, navigation, AI features, page actions, translations, and local adapters.
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/provider
10
+ - /docs/env
11
+ - /docs/versioned-docs
12
+ - /docs/proxy
13
+ ---
14
+
15
+ Configure Geistdocs through user-owned files in the generated project. Runtime features come from `@vercel/geistdocs`, while your local files control content, branding, routing adapters, and opt-in customization.
16
+
17
+ <CopyPrompt text="Review this Geistdocs project configuration. Explain what each export in geistdocs.tsx does, identify which features are enabled, and suggest safe customizations that do not require editing package internals.">
18
+ Review this Geistdocs project configuration. Explain what each export in `geistdocs.tsx` does, identify which features are enabled, and suggest safe customizations that do not require editing package internals.
19
+ </CopyPrompt>
20
+
21
+ ## Configuration files
22
+
23
+ | File | Purpose |
24
+ | --- | --- |
25
+ | `geistdocs.tsx` | Site-level settings, including logo, nav, GitHub repo, AI prompt, translations, and feature flags. |
26
+ | `lib/geistdocs/config.tsx` | Converts `geistdocs.tsx` exports into the package config using `defineConfig`. |
27
+ | `lib/geistdocs/source.ts` | Connects Fumadocs content collections to the package source adapter. |
28
+ | `components/geistdocs/mdx-components.tsx` | Adds or overrides MDX components. |
29
+ | `components/geistdocs/docs-layout.tsx` | Customizes the package-backed docs layout, including optional sidebar content. |
30
+ | `app/[lang]/docs/[[...slug]]/page.tsx` | Configures the package docs page renderer. |
31
+ | `app/[lang]/llms.txt/route.ts` | Configures the all-docs Markdown endpoint. |
32
+ | `app/[lang]/llms.mdx/[[...slug]]/route.ts` | Configures single-page Markdown responses. |
33
+ | `proxy.ts` | Configures markdown negotiation, AI-agent rewrites, request tracking, and custom request hooks. |
34
+ | `content/docs/meta.json` | Controls sidebar order and section labels. |
35
+
36
+ ## `geistdocs.tsx`
37
+
38
+ The root `geistdocs.tsx` file is the primary configuration surface:
39
+
40
+ ```tsx title="geistdocs.tsx"
41
+ export const Logo = () => <span>My Docs</span>;
42
+
43
+ export const github = {
44
+ owner: "my-org",
45
+ repo: "my-repo",
46
+ };
47
+
48
+ export const nav = [
49
+ { label: "Docs", href: "/docs" },
50
+ { label: "GitHub", href: "https://github.com/my-org/my-repo" },
51
+ ];
52
+
53
+ export const title = "My Documentation";
54
+
55
+ export const prompt =
56
+ "You are a helpful assistant that answers questions about My Documentation.";
57
+
58
+ export const suggestions = [
59
+ "How do I get started?",
60
+ "How do I deploy?",
61
+ ];
62
+
63
+ export const translations = {
64
+ en: { displayName: "English" },
65
+ };
66
+
67
+ export const basePath: string | undefined = undefined;
68
+ export const siteId: string | undefined = undefined;
69
+ ```
70
+
71
+ ## `defineConfig`
72
+
73
+ `lib/geistdocs/config.tsx` converts your root exports into a package config. Most projects only need the generated defaults:
74
+
75
+ ```tsx title="lib/geistdocs/config.tsx"
76
+ import { defineConfig } from "@vercel/geistdocs/config";
77
+ import {
78
+ basePath,
79
+ github,
80
+ Logo,
81
+ nav,
82
+ prompt,
83
+ siteId,
84
+ suggestions,
85
+ title,
86
+ translations,
87
+ } from "@/geistdocs";
88
+
89
+ export const config = defineConfig({
90
+ title,
91
+ defaultLanguage: "en",
92
+ logo: <Logo />,
93
+ github,
94
+ nav,
95
+ basePath,
96
+ siteId,
97
+ translations,
98
+ ai: {
99
+ prompt,
100
+ suggestions,
101
+ },
102
+ });
103
+ ```
104
+
105
+ Advanced sites can add `content` and `versions` metadata so local adapters and custom UI share one configuration object:
106
+
107
+ ```tsx title="lib/geistdocs/config.tsx"
108
+ export const config = defineConfig({
109
+ // ...
110
+ content: [
111
+ { id: "docs", label: "Docs", dir: "content/docs", route: "/docs" },
112
+ {
113
+ id: "cookbook",
114
+ label: "Cookbook",
115
+ dir: "content/cookbook",
116
+ route: "/cookbook",
117
+ },
118
+ ],
119
+ versions: {
120
+ current: "v6",
121
+ items: [
122
+ { id: "v6", label: "v6 latest" },
123
+ { id: "v5", label: "v5", href: "https://v5.example.com/:path*" },
124
+ ],
125
+ },
126
+ });
127
+ ```
128
+
129
+ Use [Versioned docs](/docs/versioned-docs) for versioned source setup and [Proxy and markdown routes](/docs/proxy) for route mappings.
130
+
131
+ ## Page actions
132
+
133
+ Page actions appear below the table of contents. They are enabled by default and can be disabled through `defineConfig` in `lib/geistdocs/config.tsx`:
134
+
135
+ ```tsx title="lib/geistdocs/config.tsx"
136
+ export const config = defineConfig({
137
+ // ...
138
+ pageActions: {
139
+ editSource: false,
140
+ scrollTop: true,
141
+ copyPage: true,
142
+ askAI: true,
143
+ openInChat: false,
144
+ },
145
+ feedback: {
146
+ enabled: false,
147
+ },
148
+ });
149
+ ```
150
+
151
+ ## User-owned adapters
152
+
153
+ Adapter files are safe to edit. Package updates do not overwrite them.
154
+
155
+ For example, add a custom MDX component:
156
+
157
+ ```tsx title="components/geistdocs/mdx-components.tsx"
158
+ import { createMdxComponents } from "@vercel/geistdocs/mdx";
159
+ import type { MDXComponents } from "mdx/types";
160
+
161
+ const ProductCard = ({ name }: { name: string }) => <div>{name}</div>;
162
+
163
+ export const getMDXComponents = (components?: MDXComponents): MDXComponents =>
164
+ createMdxComponents({
165
+ ProductCard,
166
+ ...components,
167
+ });
168
+ ```
169
+
170
+ Then use it in MDX:
171
+
172
+ ```mdx
173
+ <ProductCard name="My product" />
174
+ ```
175
+
176
+ ## Docs page adapter
177
+
178
+ `createDocsPage` accepts hooks for route-specific behavior:
179
+
180
+ ```tsx title="app/[lang]/docs/[[...slug]]/page.tsx"
181
+ const docsPage = createDocsPage({
182
+ config,
183
+ source: geistdocsSource,
184
+ getPageUrl: ({ page }) => page.url,
185
+ metadata: ({ metadata }) => metadata,
186
+ mdx: ({ link }) => getMDXComponents({ a: link }),
187
+ });
188
+ ```
189
+
190
+ Use `getPageUrl` when the public route differs from the source URL, such as `/v5/docs`. Use `metadata` to set canonical URLs, `robots`, or Open Graph fields for a specific route.
191
+
192
+ ## Package-owned runtime
193
+
194
+ Do not edit files inside `node_modules/@vercel/geistdocs`. Update the package instead:
195
+
196
+ ```bash title="Terminal"
197
+ pnpm exec geistdocs update
198
+ ```
199
+
200
+ If a release adds an optional prop or config field, opt into it by editing the relevant local adapter file. Existing adapters should keep compiling unless a release includes a breaking API change.
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: 部署到 Vercel
3
+ description: 学习如何将你的 Geistdocs 网站部署到 Vercel
4
+ type: guide
5
+ summary: 使用正确的项目设置从 Vercel 控制台部署您的 Geistdocs 站点。
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ - /docs/env
9
+ related:
10
+ - /docs/configuration
11
+ ---
12
+
13
+ ## 先决条件
14
+
15
+ 在部署之前,你需要:
16
+
17
+ - 一个 [GitHub 帐户](https://github.com) 并包含你的 Geistdocs 仓库
18
+ - 一个 [Vercel 帐户](https://vercel.com)(在 [vercel.com](https://vercel.com) 注册)
19
+ - 你的 Vercel 帐户已连接到你的 GitHub 帐户
20
+ - 已准备好的环境变量(参见 [环境变量](/docs/env))
21
+
22
+ ## 部署到 Vercel
23
+
24
+ 要从 Vercel 控制面板部署:
25
+
26
+ 1. 前往 [vercel.com/new](https://vercel.com/new)
27
+ 2. 选择你的 Geistdocs 仓库
28
+ 3. 配置你的项目设置:
29
+ - **框架预设**: Next.js(自动检测)
30
+ - **构建命令**: `pnpm build` or `npm run build`
31
+ - **输出目录**: `.next` (默认)
32
+ - **安装命令**: `pnpm install` or `npm install`
33
+ 4. 添加你的环境变量(参见 [环境变量](/docs/env))
34
+ 5. 点击 "部署"
@@ -0,0 +1,40 @@
1
+ ---
2
+ title: Deploy to Vercel
3
+ description: Learn how to deploy your Geistdocs site to Vercel
4
+ type: guide
5
+ summary: Deploy your Geistdocs site to Vercel from the dashboard with the correct project settings.
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ - /docs/env
9
+ related:
10
+ - /docs/configuration
11
+ ---
12
+
13
+ Deploy a Geistdocs site to Vercel as a Next.js app. Make sure your package dependency, environment variables, and production URL are configured before shipping.
14
+
15
+ <CopyPrompt text="Help me deploy this Geistdocs project to Vercel. Check the package scripts, required environment variables, and Vercel project settings, then give me a deploy checklist for production.">
16
+ Help me deploy this Geistdocs project to Vercel. Check the package scripts, required environment variables, and Vercel project settings, then give me a deploy checklist for production.
17
+ </CopyPrompt>
18
+
19
+ ## Prerequisites
20
+
21
+ Before deploying, you need:
22
+
23
+ - A [GitHub account](https://github.com) with your Geistdocs repository
24
+ - A [Vercel account](https://vercel.com) (sign up at [vercel.com](https://vercel.com))
25
+ - Your Vercel account connected to your GitHub account
26
+ - Environment variables ready (see [Environment Variables](/docs/env))
27
+
28
+ ## Deploy to Vercel
29
+
30
+ To deploy from the Vercel dashboard:
31
+
32
+ 1. Go to [vercel.com/new](https://vercel.com/new)
33
+ 2. Select your Geistdocs repository
34
+ 3. Configure your project settings:
35
+ - **Framework Preset**: Next.js (automatically detected)
36
+ - **Build Command**: `pnpm build` or `npm run build`
37
+ - **Output Directory**: `.next` (default)
38
+ - **Install Command**: `pnpm install` or `npm install`
39
+ 4. Add your environment variables (see [Environment Variables](/docs/env))
40
+ 5. Click "Deploy"
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: 在 GitHub 上编辑
3
+ description: 允许读者通过在 GitHub 上编辑文档页面直接贡献更改
4
+ type: integration
5
+ summary: 每个文档页面上的直接链接,让读者通过 GitHub 拉取请求提出更改。
6
+ related:
7
+ - /docs/configuration
8
+ ---
9
+
10
+ “在 GitHub 上编辑” 功能为读者提供了一个直接的链接,用于建议对您的文档进行更改。该链接出现在每个文档页面的目录侧栏中,方便用户提交修复、改进或更新。
11
+
12
+ ## 工作原理
13
+
14
+ 当用户点击 **“在 GitHub 上编辑此页”** 链接时,会直接跳转到您 GitHub 仓库中的源文件。在那里,他们可以:
15
+
16
+ 1. Fork 仓库(如果尚未 Fork)
17
+ 2. 在 GitHub 网页编辑器中进行编辑
18
+ 3. 提交包含其更改的 pull request
19
+
20
+ 此工作流程利用了 GitHub 内置的编辑功能,使技术用户和非技术用户都能方便地进行贡献。
21
+
22
+ ## 配置
23
+
24
+ "在 GitHub 上编辑" 链接基于 `geistdocs.tsx` 配置文件中的 `github` 对象自动生成。设置 `owner` 和 `repo` 属性以启用此功能:
25
+
26
+ ```tsx
27
+ export const github = {
28
+ owner: "your-username",
29
+ repo: "your-repo-name",
30
+ };
31
+ ```
32
+
33
+ 如果这些值未设置,该链接将不会出现在您的文档页面上。
34
+
35
+ ### 生成的 URL 格式
36
+
37
+ 链接遵循以下模式:
38
+
39
+ ```
40
+ https://github.com/{owner}/{repo}/edit/main/content/docs/{file-path}
41
+ ```
42
+
43
+ 例如,如果您的页面位于 `content/docs/getting-started.mdx`,则生成的链接为:
44
+
45
+ ```
46
+ https://github.com/your-username/your-repo-name/edit/main/content/docs/getting-started.mdx
47
+ ```
@@ -0,0 +1,51 @@
1
+ ---
2
+ title: Edit on GitHub
3
+ description: Allow readers to contribute directly by editing documentation pages on GitHub
4
+ type: integration
5
+ summary: A direct link on every documentation page that lets readers propose changes through GitHub pull requests.
6
+ related:
7
+ - /docs/configuration
8
+ ---
9
+
10
+ The "Edit on GitHub" feature gives readers a direct link to propose documentation changes. This link appears in the table of contents sidebar on every documentation page.
11
+
12
+ <CopyPrompt text="Help me configure Edit on GitHub for this Geistdocs site. Check the github owner and repo in geistdocs.tsx, verify the generated edit URL for this page, and tell me how to disable the action if needed.">
13
+ Help me configure Edit on GitHub for this Geistdocs site. Check the `github` owner and repo in `geistdocs.tsx`, verify the generated edit URL for this page, and tell me how to disable the action if needed.
14
+ </CopyPrompt>
15
+
16
+ ## How it works
17
+
18
+ When users click the "Edit this page on GitHub" link, they are taken directly to the source file in your GitHub repository. From there, they can:
19
+
20
+ 1. Fork the repository (if they haven't already)
21
+ 2. Make their edits in the GitHub web editor
22
+ 3. Submit a pull request with their changes
23
+
24
+ This workflow leverages GitHub's built-in editing capabilities, making it straightforward for both technical and non-technical users to contribute.
25
+
26
+ ## Configuration
27
+
28
+ The Edit on GitHub link is automatically generated based on the `github` object in your `geistdocs.tsx` configuration file. Set the `owner` and `repo` properties to enable this feature:
29
+
30
+ ```tsx
31
+ export const github = {
32
+ owner: "your-username",
33
+ repo: "your-repo-name",
34
+ };
35
+ ```
36
+
37
+ If these values are not set, the link will not appear on your documentation pages.
38
+
39
+ ### Generated URL Format
40
+
41
+ The link follows this pattern:
42
+
43
+ ```
44
+ https://github.com/{owner}/{repo}/edit/main/content/docs/{file-path}
45
+ ```
46
+
47
+ For example, if your page is located at `content/docs/getting-started.mdx`, the generated link would be:
48
+
49
+ ```
50
+ https://github.com/your-username/your-repo-name/edit/main/content/docs/getting-started.mdx
51
+ ```
@@ -0,0 +1,25 @@
1
+ ---
2
+ title: 环境变量
3
+ description: 了解 Geistdocs 中使用的环境变量
4
+ type: reference
5
+ summary: Geistdocs 所需的 AI 聊天和生产 URL 配置环境变量。
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/configuration
10
+ - /docs/deployment
11
+ ---
12
+
13
+ Geistdocs 的某些功能需要设置特定的环境变量。
14
+
15
+ ## `AI_GATEWAY_API_KEY`
16
+
17
+ AI 网关的 API 密钥。用于驱动 AI 聊天功能。
18
+
19
+ <Callout>部署到 Vercel 时会自动设置此项。</Callout>
20
+
21
+ ## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`
22
+
23
+ Geistdocs 站点的生产环境 URL。部署到 Vercel 时会自动设置此项。
24
+
25
+ 应采用 `localhost:3000` 的格式(即不带协议前缀)。这是 Vercel 在将项目部署时设置该环境变量的方式。
@@ -0,0 +1,29 @@
1
+ ---
2
+ title: Environment Variables
3
+ description: Learn about the environment variables used in Geistdocs
4
+ type: reference
5
+ summary: Environment variables required by Geistdocs for AI chat and production URL configuration.
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/configuration
10
+ - /docs/deployment
11
+ ---
12
+
13
+ Geistdocs has functionality that requires specific environment variables to be set.
14
+
15
+ <CopyPrompt text="Review this Geistdocs project and help me configure the required environment variables. Check whether AI_GATEWAY_API_KEY and NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL are needed for the features I enabled, then tell me where to set them locally and on Vercel.">
16
+ Review this Geistdocs project and help me configure the required environment variables. Check whether `AI_GATEWAY_API_KEY` and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` are needed for the features I enabled, then tell me where to set them locally and on Vercel.
17
+ </CopyPrompt>
18
+
19
+ ## `AI_GATEWAY_API_KEY`
20
+
21
+ The API key for the AI gateway. This is used to power the AI chat functionality.
22
+
23
+ <Callout>This is automatically set when deploying to Vercel.</Callout>
24
+
25
+ ## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`
26
+
27
+ The production URL of the Geistdocs site. This is automatically set when deploying to Vercel.
28
+
29
+ It should be in the format `localhost:3000` (i.e. without the protocol prefix). This is how Vercel sets the environment variable when deploying to a project.
@@ -0,0 +1,85 @@
1
+ ---
2
+ title: 反馈
3
+ description: 使用基于情感的交互式小部件收集用户反馈并创建 GitHub Issues
4
+ type: integration
5
+ summary: 收集用户情感反馈并自动创建结构化 GitHub Issues 的交互式反馈小部件。
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/provider
10
+ - /docs/configuration
11
+ ---
12
+
13
+ 反馈功能允许阅读者通过交互式小部件分享他们对文档页面的看法。反馈会自动以 issues 的形式发布到集中管理的 GitHub 仓库,便于跟踪、标记和响应用户输入。
14
+
15
+ ## 工作原理
16
+
17
+ 反馈小部件会显示在每个文档页面的目录侧边栏中。当用户点击“提供反馈”时,他们可以:
18
+
19
+ 1. 撰写他们的反馈信息
20
+ 2. 选择表示其体验的情感(🤩、🙂、😕、😭)
21
+ 3. 可选地提供他们的姓名和电子邮件
22
+ 4. 提交他们的反馈
23
+
24
+ ### 反馈工作流
25
+
26
+ 当反馈被提交时:
27
+
28
+ 1. 反馈会根据 JSON 模式进行验证
29
+ 2. 在配置的反馈仓库中创建一个新的 GitHub Issue
30
+ 3. 根据情感、主题和其他元数据自动应用标签
31
+ 4. 用户详情和元数据被格式化为结构化的 markdown 表格
32
+
33
+ 每条反馈都会创建一个单独的 issue,便于单独跟踪和解决。
34
+
35
+ ## 反馈架构
36
+
37
+ API 接受以下字段:
38
+
39
+ | Field | Type | Required | Max Length | Description |
40
+ | --------- | ------ | -------- | ---------- | ------------------------------------- |
41
+ | `note` | string | 是 | 16,384 | 反馈消息 |
42
+ | `url` | string | 否 | 1,024 | 提交反馈的页面 URL |
43
+ | `emotion` | string | 否 | 1 | 表示用户情感的表情符号 |
44
+ | `topic` | string | 否 | 1,024 | 反馈主题/类别 |
45
+ | `name` | string | 否 | 1,024 | 用户姓名 |
46
+ | `email` | string | 否 | 1,024 | 用户电子邮件 |
47
+ | `ua` | string | 否 | 256 | 用户代理字符串 |
48
+ | `label` | string | 否 | 64 | 用于 issue 的自定义标签 |
49
+ | `thumbs` | string | 否 | 4 | 赞成/反对 指示器 |
50
+ | `reason` | string | 否 | 10 | 不赞成的原因 |
51
+ | `plan` | string | 否 | 10 | 用户的计划类型 |
52
+
53
+ 附加字段会作为元数据被捕获并显示在 issue 正文中。
54
+
55
+ ## 功能
56
+
57
+ ### 自动标记
58
+
59
+ Issues 会根据以下内容自动添加标签:
60
+
61
+ - **情感**: `emotion-amazed`, `emotion-happy`, `emotion-sad`, `emotion-cry`
62
+ - **主题**: `topic-{topic-name}`
63
+ - **计划**: `{plan}-plan`
64
+ - **赞/踩**: `thumbs-up`, `thumbs-down`
65
+ - **原因**: `reason-{reason}`(用于不赞成)
66
+ - **自定义标签**: 通过 `label` 字段传入的任何标签
67
+ - **默认标签**: `unresolved`, `vercel-site`
68
+
69
+ ### 结构化的 Issue 正文
70
+
71
+ 每个 issue 包含格式化的 markdown 正文,包含:
72
+
73
+ - 反馈内容
74
+ - 提交反馈的页面 URL
75
+ - 用户详情表(电子邮件、上下文、IP、用户代理)
76
+ - 用于任何附加字段的元数据表
77
+
78
+ ### 元数据支持
79
+
80
+ 在请求正文中传递任何附加字段,它们将被作为元数据捕获并显示在 issue 的单独表格中。这允许你包含:
81
+
82
+ - 用户 ID
83
+ - 功能开关
84
+ - 实验分组
85
+ - 自定义跟踪数据