@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,416 @@
1
+ ---
2
+ title: 语法
3
+ description: 了解受支持的 Markdown 语法和格式选项
4
+ type: reference
5
+ summary: 支持的 MDX 语法,包括文本格式、代码块、行高亮和 Mermaid 图表。
6
+ prerequisites:
7
+ - /docs/getting-started
8
+ related:
9
+ - /docs/configuration
10
+ ---
11
+
12
+ Geistdocs 支持 MDX,这是 Markdown 的超集,允许您在文档中使用 JSX 组件。本指南涵盖所有可用的格式选项。
13
+
14
+ ## Frontmatter
15
+
16
+ 每个 MDX 文件应在顶部包含 frontmatter:
17
+
18
+ ```yaml
19
+ ---
20
+ title: Page Title
21
+ description: A brief description of the page content
22
+ ---
23
+ ```
24
+
25
+ `title` 属性为必填,用于页面标题和导航。`description` 用于 SEO 和页面预览。
26
+
27
+ ## Basic Markdown
28
+
29
+ ### 文本格式
30
+
31
+ 您可以使用标准 Markdown 语法来设置文本样式:
32
+
33
+ - **加粗文本** 使用 `**double asterisks**`
34
+ - _斜体文本_ 使用 `*single asterisks*`
35
+ - ~~删除线~~ 使用 `~~double tildes~~`
36
+ - `行内代码` 使用 `` `backticks` ``
37
+
38
+ ### 标题
39
+
40
+ 使用 `#` 符号创建标题:
41
+
42
+ ```md
43
+ # Heading 1
44
+
45
+ ## Heading 2
46
+
47
+ ### Heading 3
48
+
49
+ #### Heading 4
50
+
51
+ ##### Heading 5
52
+
53
+ ###### Heading 6
54
+ ```
55
+
56
+ 标题会自动生成锚点链接,便于导航和深度链接。
57
+
58
+ ### 列表
59
+
60
+ 使用 `-`、`*` 或 `+` 创建无序列表:
61
+
62
+ - 第一项
63
+ - 第二项
64
+ - 嵌套项
65
+ - 另一个嵌套项
66
+ - 第三项
67
+
68
+ 使用数字创建有序列表:
69
+
70
+ 1. 第一步
71
+ 2. 第二步
72
+ 3. 第三步
73
+
74
+ ### 引用
75
+
76
+ 使用 `>` 创建引用:
77
+
78
+ > 这是一个引用。您可以用它来突出重要信息或引用外部来源。
79
+
80
+ ### 链接
81
+
82
+ 使用 `[text](url)` 创建链接:
83
+
84
+ - [外部链接](https://vercel.com)
85
+ - [内部链接](/docs/getting-started)
86
+
87
+ ### 图片
88
+
89
+ 使用 `![alt text](url)` 添加图片:
90
+
91
+ ```md
92
+ ![Description of the image](/path/to/image.png)
93
+ ```
94
+
95
+ ## GitHub Flavored Markdown
96
+
97
+ Geistdocs 支持 GFM 扩展,包括表格、任务列表和自动链接。
98
+
99
+ ### 表格
100
+
101
+ 使用竖线和短横线创建表格:
102
+
103
+ ```md
104
+ | Feature | Description | Status |
105
+ | -------- | ----------------- | --------- |
106
+ | Markdown | Basic formatting | Supported |
107
+ | GFM | GitHub extensions | Supported |
108
+ | MDX | JSX in Markdown | Supported |
109
+ ```
110
+
111
+ 渲染为:
112
+
113
+ | Feature | Description | Status |
114
+ | -------- | ----------------- | --------- |
115
+ | Markdown | Basic formatting | Supported |
116
+ | GFM | GitHub extensions | Supported |
117
+ | MDX | JSX in Markdown | Supported |
118
+
119
+ ### 任务列表
120
+
121
+ 创建交互式任务列表:
122
+
123
+ ```md
124
+ - [x] Completed task
125
+ - [ ] Incomplete task
126
+ - [ ] Another task to do
127
+ ```
128
+
129
+ 渲染为:
130
+
131
+ - [x] 已完成任务
132
+ - [ ] 未完成任务
133
+ - [ ] 另一个待办任务
134
+
135
+ ### 自动链接
136
+
137
+ URL 会自动转换为可点击链接:
138
+
139
+ ```md
140
+ https://vercel.com
141
+ ```
142
+
143
+ 渲染为:
144
+
145
+ https://vercel.com
146
+
147
+ ## 代码块
148
+
149
+ 围栏代码块支持多种语言的语法高亮。
150
+
151
+ ### 基本语法高亮
152
+
153
+ 在开头的反引号后指定语言:
154
+
155
+ ````md
156
+ ```typescript
157
+ const greet = (name: string): string => {
158
+ return `Hello, ${name}!`;
159
+ };
160
+ ```
161
+ ````
162
+
163
+ 渲染为:
164
+
165
+ ```typescript
166
+ const greet = (name: string): string => {
167
+ return `Hello, ${name}!`;
168
+ };
169
+ ```
170
+
171
+ ### 代码块标题
172
+
173
+ 使用 `title` 属性为代码块添加标题:
174
+
175
+ ````md
176
+ ```tsx title="components/button.tsx"
177
+ export const Button = ({ children }) => {
178
+ return <button type="button">{children}</button>;
179
+ };
180
+ ```
181
+ ````
182
+
183
+ 渲染为:
184
+
185
+ ```tsx title="components/button.tsx"
186
+ export const Button = ({ children }) => {
187
+ return <button type="button">{children}</button>;
188
+ };
189
+ ```
190
+
191
+ ### 行号
192
+
193
+ 通过添加 `lineNumbers` 属性来显示行号:
194
+
195
+ ````md
196
+ ```typescript lineNumbers
197
+ const numbers = [1, 2, 3, 4, 5];
198
+ const doubled = numbers.map((n) => n * 2);
199
+ console.log(doubled);
200
+ ```
201
+ ````
202
+
203
+ 渲染为:
204
+
205
+ ```typescript lineNumbers
206
+ const numbers = [1, 2, 3, 4, 5];
207
+ const doubled = numbers.map((n) => n * 2);
208
+ console.log(doubled);
209
+ ```
210
+
211
+ 您也可以使用 `lineNumbers=10` 指定起始行号:
212
+
213
+ ```typescript lineNumbers=10
214
+ const config = {
215
+ theme: "dark",
216
+ language: "en",
217
+ };
218
+ ```
219
+
220
+ ### 行高亮
221
+
222
+ 使用 `[!code highlight]` 注释高亮特定行:
223
+
224
+ ````md
225
+ ```typescript
226
+ const config = {
227
+ theme: "dark", // [ !code highlight]
228
+ language: "en",
229
+ };
230
+ ```
231
+ ````
232
+
233
+ 在使用此语法时,请移除 `!` 前的空格。渲染为:
234
+
235
+ ```typescript
236
+ const config = {
237
+ theme: "dark", // [!code highlight]
238
+ language: "en",
239
+ };
240
+ ```
241
+
242
+ ### 单词高亮
243
+
244
+ 使用 `[!code word:term]` 高亮特定单词:
245
+
246
+ ````md
247
+ ```typescript
248
+ // [ !code word:config]
249
+ const config = {
250
+ theme: "dark",
251
+ };
252
+
253
+ console.log(config);
254
+ ```
255
+ ````
256
+
257
+ 在使用此语法时,请移除 `!` 前的空格。渲染为:
258
+
259
+ ```typescript
260
+ // [!code word:config]
261
+ const config = {
262
+ theme: "dark",
263
+ };
264
+
265
+ console.log(config);
266
+ ```
267
+
268
+ ### 差异语法
269
+
270
+ 使用 `[!code ++]` 和 `[!code --]` 显示添加和删除:
271
+
272
+ ````md
273
+ ```typescript
274
+ const config = {
275
+ theme: "light", // [ !code --]
276
+ theme: "dark", // [ !code ++]
277
+ language: "en",
278
+ };
279
+ ```
280
+ ````
281
+
282
+ 在使用此语法时,请移除 `!` 前的空格。渲染为:
283
+
284
+ ```typescript
285
+ const config = {
286
+ theme: "light", // [!code --]
287
+ theme: "dark", // [!code ++]
288
+ language: "en",
289
+ };
290
+ ```
291
+
292
+ ### 焦点行
293
+
294
+ 使用 `[!code focus]` 强调特定行:
295
+
296
+ ````md
297
+ ```typescript
298
+ const numbers = [1, 2, 3, 4, 5];
299
+ const sum = numbers.reduce((a, b) => a + b, 0); // [ !code focus]
300
+ console.log(sum);
301
+ ```
302
+ ````
303
+
304
+ 在使用此语法时,请移除 `!` 前的空格。渲染为:
305
+
306
+ ```typescript
307
+ const numbers = [1, 2, 3, 4, 5];
308
+ const sum = numbers.reduce((a, b) => a + b, 0); // [!code focus]
309
+ console.log(sum);
310
+ ```
311
+
312
+ ## Mermaid 图表
313
+
314
+ 使用 Mermaid 语法创建图表和流程图。
315
+
316
+ ### 流程图
317
+
318
+ ````md
319
+ ```mermaid
320
+ graph TD;
321
+ A[Start] --> B{Is it working?};
322
+ B -->|Yes| C[Great!];
323
+ B -->|No| D[Debug];
324
+ D --> B;
325
+ ```
326
+ ````
327
+
328
+ 渲染为:
329
+
330
+ ```mermaid
331
+ graph TD;
332
+ A[Start] --> B{Is it working?};
333
+ B -->|Yes| C[Great!];
334
+ B -->|No| D[Debug];
335
+ D --> B;
336
+ ```
337
+
338
+ ### 时序图
339
+
340
+ ````md
341
+ ```mermaid
342
+ sequenceDiagram
343
+ participant User
344
+ participant API
345
+ participant Database
346
+ User->>API: Request data
347
+ API->>Database: Query
348
+ Database-->>API: Results
349
+ API-->>User: Response
350
+ ```
351
+ ````
352
+
353
+ 渲染为:
354
+
355
+ ```mermaid
356
+ sequenceDiagram
357
+ participant User
358
+ participant API
359
+ participant Database
360
+ User->>API: Request data
361
+ API->>Database: Query
362
+ Database-->>API: Results
363
+ API-->>User: Response
364
+ ```
365
+
366
+ ### 架构图
367
+
368
+ ````md
369
+ ```mermaid
370
+ graph TD;
371
+ subgraph Frontend
372
+ A[Web App]
373
+ B[Mobile App]
374
+ end
375
+ subgraph Backend
376
+ C[API Gateway]
377
+ D[Auth Service]
378
+ E[Data Service]
379
+ end
380
+ subgraph Storage
381
+ F[(Database)]
382
+ G[(Cache)]
383
+ end
384
+ A --> C
385
+ B --> C
386
+ C --> D
387
+ C --> E
388
+ E --> F
389
+ E --> G
390
+ ```
391
+ ````
392
+
393
+ 渲染为:
394
+
395
+ ```mermaid
396
+ graph TD;
397
+ subgraph Frontend
398
+ A[Web App]
399
+ B[Mobile App]
400
+ end
401
+ subgraph Backend
402
+ C[API Gateway]
403
+ D[Auth Service]
404
+ E[Data Service]
405
+ end
406
+ subgraph Storage
407
+ F[(Database)]
408
+ G[(Cache)]
409
+ end
410
+ A --> C
411
+ B --> C
412
+ C --> D
413
+ C --> E
414
+ E --> F
415
+ E --> G
416
+ ```