@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,126 @@
1
+ import type { Metadata } from "next";
2
+ import {
3
+ CommandPromptContent,
4
+ CommandPromptCopy,
5
+ CommandPromptList,
6
+ CommandPromptPrefix,
7
+ CommandPromptRoot,
8
+ CommandPromptSurface,
9
+ CommandPromptTrigger,
10
+ CommandPromptTriggerDivider,
11
+ CommandPromptViewport,
12
+ } from "@/components/ui/command-prompt";
13
+ import { CenteredSection } from "./components/centered-section";
14
+ import { CTA } from "./components/cta";
15
+ import { Hero } from "./components/hero";
16
+ import { OneTwoSection } from "./components/one-two-section";
17
+ import { Templates } from "./components/templates";
18
+ import { TextGridSection } from "./components/text-grid-section";
19
+
20
+ const title = "Geistdocs";
21
+ const description =
22
+ "A Vercel documentation template built with Next.js and Fumadocs. Designed for spinning up documentation sites quickly and consistently.";
23
+
24
+ export const metadata: Metadata = {
25
+ title,
26
+ description,
27
+ };
28
+
29
+ const templates = [
30
+ {
31
+ title: "Template 1",
32
+ description: "Description of template 1",
33
+ link: "https://example.com/template-1",
34
+ image: "https://placehold.co/600x400.png",
35
+ },
36
+ {
37
+ title: "Template 2",
38
+ description: "Description of template 2",
39
+ link: "https://example.com/template-2",
40
+ image: "https://placehold.co/600x400.png",
41
+ },
42
+ {
43
+ title: "Template 3",
44
+ description: "Description of template 3",
45
+ link: "https://example.com/template-3",
46
+ image: "https://placehold.co/600x400.png",
47
+ },
48
+ ];
49
+
50
+ const textGridSection = [
51
+ {
52
+ id: "1",
53
+ title: "Text Grid Section",
54
+ description: "Description of text grid section",
55
+ },
56
+ {
57
+ id: "2",
58
+ title: "Text Grid Section",
59
+ description: "Description of text grid section",
60
+ },
61
+ {
62
+ id: "3",
63
+ title: "Text Grid Section",
64
+ description: "Description of text grid section",
65
+ },
66
+ ];
67
+
68
+ const COMMAND_FOR_HUMANS = "npx @vercel/geistdocs init";
69
+ const COMMAND_FOR_AGENTS = "npx @vercel/geistdocs init --agent";
70
+
71
+ const HomePage = () => (
72
+ <div className="container mx-auto max-w-5xl">
73
+ <Hero
74
+ badge="Geistdocs is now in beta"
75
+ description={description}
76
+ title={title}
77
+ >
78
+ <CommandPromptRoot defaultValue="humans">
79
+ <CommandPromptList>
80
+ <CommandPromptTrigger className="min-w-[90px]" value="humans">
81
+ For humans
82
+ </CommandPromptTrigger>
83
+ <CommandPromptTriggerDivider />
84
+ <CommandPromptTrigger className="min-w-[84px]" value="agents">
85
+ For agents
86
+ </CommandPromptTrigger>
87
+ </CommandPromptList>
88
+ <CommandPromptSurface>
89
+ <CommandPromptPrefix>$</CommandPromptPrefix>
90
+ <CommandPromptViewport>
91
+ <CommandPromptContent copyValue={COMMAND_FOR_HUMANS} value="humans">
92
+ {COMMAND_FOR_HUMANS}
93
+ </CommandPromptContent>
94
+ <CommandPromptContent copyValue={COMMAND_FOR_AGENTS} value="agents">
95
+ {COMMAND_FOR_AGENTS}
96
+ </CommandPromptContent>
97
+ </CommandPromptViewport>
98
+ <CommandPromptCopy />
99
+ </CommandPromptSurface>
100
+ </CommandPromptRoot>
101
+ </Hero>
102
+ <div className="grid divide-y border-y sm:border-x">
103
+ <TextGridSection data={textGridSection} />
104
+ <CenteredSection
105
+ description="Description of centered section"
106
+ title="Centered Section"
107
+ >
108
+ <div className="aspect-video rounded-lg border bg-background" />
109
+ </CenteredSection>
110
+ <OneTwoSection
111
+ description="Description of one/two section"
112
+ title="One/Two Section"
113
+ >
114
+ <div className="aspect-video rounded-lg border bg-background" />
115
+ </OneTwoSection>
116
+ <Templates
117
+ data={templates}
118
+ description="See Geistdocs in action with one of our templates."
119
+ title="Get started quickly"
120
+ />
121
+ <CTA cta="Get started" href="/docs" title="Start your docs today" />
122
+ </div>
123
+ </div>
124
+ );
125
+
126
+ export default HomePage;
@@ -0,0 +1,19 @@
1
+ import { createDocsPage } from "@vercel/geistdocs/pages/docs";
2
+ import { getMDXComponents } from "@/components/geistdocs/mdx-components";
3
+ import { MobileDocsBar } from "@/components/geistdocs/mobile-docs-bar";
4
+ import { config } from "@/lib/geistdocs/config";
5
+ import { geistdocsSource } from "@/lib/geistdocs/source";
6
+
7
+ const docsPage = createDocsPage({
8
+ config,
9
+ mdx: ({ link }) => getMDXComponents({ a: link }),
10
+ source: geistdocsSource,
11
+ tableOfContentPopover: {
12
+ enabled: false,
13
+ },
14
+ renderTop: ({ data }) => <MobileDocsBar toc={data.toc} />,
15
+ });
16
+
17
+ export default docsPage.Page;
18
+ export const generateStaticParams = docsPage.generateStaticParams;
19
+ export const generateMetadata = docsPage.generateMetadata;
@@ -0,0 +1,14 @@
1
+ import { DocsLayout } from "@/components/geistdocs/docs-layout";
2
+ import { source } from "@/lib/geistdocs/source";
3
+
4
+ const Layout = async ({ children, params }: LayoutProps<"/[lang]/docs">) => {
5
+ const { lang } = await params;
6
+
7
+ return (
8
+ <div className="bg-background-200">
9
+ <DocsLayout tree={source.pageTree[lang]}>{children}</DocsLayout>
10
+ </div>
11
+ );
12
+ };
13
+
14
+ export default Layout;
@@ -0,0 +1,29 @@
1
+ import "../global.css";
2
+ import { Footer } from "@/components/geistdocs/footer";
3
+ import { Navbar } from "@/components/geistdocs/navbar";
4
+ import { GeistdocsProvider } from "@/components/geistdocs/provider";
5
+ import { basePath } from "@/geistdocs";
6
+ import { mono, sans } from "@/lib/geistdocs/fonts";
7
+ import { cn } from "@/lib/utils";
8
+
9
+ const Layout = async ({ children, params }: LayoutProps<"/[lang]">) => {
10
+ const { lang } = await params;
11
+
12
+ return (
13
+ <html
14
+ className={cn(sans.variable, mono.variable, "antialiased")}
15
+ lang={lang}
16
+ suppressHydrationWarning
17
+ >
18
+ <body>
19
+ <GeistdocsProvider basePath={basePath} lang={lang}>
20
+ <Navbar />
21
+ {children}
22
+ <Footer />
23
+ </GeistdocsProvider>
24
+ </body>
25
+ </html>
26
+ );
27
+ };
28
+
29
+ export default Layout;
@@ -0,0 +1,7 @@
1
+ import { createDocsMarkdownRoute } from "@vercel/geistdocs/routes/llms";
2
+ import { geistdocsSource } from "@/lib/geistdocs/source";
3
+
4
+ export const { GET, generateStaticParams, revalidate } =
5
+ createDocsMarkdownRoute({
6
+ source: geistdocsSource,
7
+ });
@@ -0,0 +1,6 @@
1
+ import { createLlmsRoute } from "@vercel/geistdocs/routes/llms";
2
+ import { geistdocsSource } from "@/lib/geistdocs/source";
3
+
4
+ export const { GET, revalidate } = createLlmsRoute({
5
+ source: geistdocsSource,
6
+ });
@@ -0,0 +1,95 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { join } from "node:path";
3
+ import { ImageResponse } from "next/og";
4
+ import type { NextRequest } from "next/server";
5
+ import { getPageImage, source } from "@/lib/geistdocs/source";
6
+
7
+ export const GET = async (
8
+ _request: NextRequest,
9
+ { params }: RouteContext<"/[lang]/og/[...slug]">
10
+ ) => {
11
+ const { slug, lang } = await params;
12
+ const page = source.getPage(slug.slice(0, -1), lang);
13
+
14
+ if (!page) {
15
+ return new Response("Not found", { status: 404 });
16
+ }
17
+
18
+ const { title, description } = page.data;
19
+
20
+ const regularFont = await readFile(
21
+ join(process.cwd(), "app/[lang]/og/[...slug]/geist-sans-regular.ttf")
22
+ );
23
+
24
+ const semiboldFont = await readFile(
25
+ join(process.cwd(), "app/[lang]/og/[...slug]/geist-sans-semibold.ttf")
26
+ );
27
+
28
+ const backgroundImage = await readFile(
29
+ join(process.cwd(), "app/[lang]/og/[...slug]/background.png")
30
+ );
31
+
32
+ const backgroundImageData = backgroundImage.buffer.slice(
33
+ backgroundImage.byteOffset,
34
+ backgroundImage.byteOffset + backgroundImage.byteLength
35
+ );
36
+
37
+ return new ImageResponse(
38
+ <div style={{ fontFamily: "Geist" }} tw="flex h-full w-full bg-black">
39
+ {/** biome-ignore lint/performance/noImgElement: "Required for Satori" */}
40
+ <img
41
+ alt="Vercel OpenGraph Background"
42
+ height={628}
43
+ src={backgroundImageData as never}
44
+ width={1200}
45
+ />
46
+ <div tw="flex flex-col absolute h-full w-[750px] justify-center left-[50px] pr-[50px] pt-[116px] pb-[86px]">
47
+ <div
48
+ style={{
49
+ textWrap: "balance",
50
+ }}
51
+ tw="text-5xl font-medium text-white tracking-tight flex leading-[1.1] mb-4"
52
+ >
53
+ {title}
54
+ </div>
55
+ <div
56
+ style={{
57
+ color: "#8B8B8B",
58
+ lineHeight: "44px",
59
+ textWrap: "balance",
60
+ }}
61
+ tw="text-[32px]"
62
+ >
63
+ {description}
64
+ </div>
65
+ </div>
66
+ </div>,
67
+ {
68
+ width: 1200,
69
+ height: 628,
70
+ fonts: [
71
+ {
72
+ name: "Geist",
73
+ data: regularFont,
74
+ weight: 400,
75
+ },
76
+ {
77
+ name: "Geist",
78
+ data: semiboldFont,
79
+ weight: 500,
80
+ },
81
+ ],
82
+ }
83
+ );
84
+ };
85
+
86
+ export const generateStaticParams = async ({
87
+ params,
88
+ }: RouteContext<"/[lang]/og/[...slug]">) => {
89
+ const { lang } = await params;
90
+
91
+ return source.getPages(lang).map((page) => ({
92
+ lang: page.locale,
93
+ slug: getPageImage(page).segments,
94
+ }));
95
+ };
@@ -0,0 +1,52 @@
1
+ import { Feed } from "feed";
2
+ import type { NextRequest } from "next/server";
3
+ import { title } from "@/geistdocs";
4
+ import { source } from "@/lib/geistdocs/source";
5
+
6
+ const protocol = process.env.NODE_ENV === "production" ? "https" : "http";
7
+ const baseUrl = `${protocol}://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`;
8
+
9
+ export const revalidate = false;
10
+
11
+ export const GET = async (
12
+ _req: NextRequest,
13
+ { params }: RouteContext<"/[lang]/rss.xml">
14
+ ) => {
15
+ const { lang } = await params;
16
+ const feed = new Feed({
17
+ title,
18
+ id: baseUrl,
19
+ link: baseUrl,
20
+ language: lang,
21
+ copyright: `All rights reserved ${new Date().getFullYear()}, Vercel`,
22
+ });
23
+
24
+ for (const page of source.getPages(lang)) {
25
+ const data = page.data as {
26
+ description?: string;
27
+ lastModified?: Date;
28
+ title?: string;
29
+ };
30
+
31
+ feed.addItem({
32
+ id: page.url,
33
+ title: data.title ?? page.url,
34
+ description: data.description,
35
+ link: `${baseUrl}${page.url}`,
36
+ date: new Date(data.lastModified ?? new Date()),
37
+ author: [
38
+ {
39
+ name: "Vercel",
40
+ },
41
+ ],
42
+ });
43
+ }
44
+
45
+ const rss = feed.rss2();
46
+
47
+ return new Response(rss, {
48
+ headers: {
49
+ "Content-Type": "application/rss+xml",
50
+ },
51
+ });
52
+ };
@@ -0,0 +1,9 @@
1
+ import { createSitemapMarkdownRoute } from "@vercel/geistdocs/routes/sitemap";
2
+ import { config } from "@/lib/geistdocs/config";
3
+ import { source } from "@/lib/geistdocs/source";
4
+
5
+ export const { GET, generateStaticParams, revalidate, dynamic } =
6
+ createSitemapMarkdownRoute({
7
+ config,
8
+ source,
9
+ });
@@ -0,0 +1,18 @@
1
+ export const emotions = [
2
+ {
3
+ name: "cry",
4
+ emoji: "😭",
5
+ },
6
+ {
7
+ name: "sad",
8
+ emoji: "😕",
9
+ },
10
+ {
11
+ name: "happy",
12
+ emoji: "🙂",
13
+ },
14
+ {
15
+ name: "amazed",
16
+ emoji: "🤩",
17
+ },
18
+ ];
@@ -0,0 +1,45 @@
1
+ "use server";
2
+
3
+ import { headers } from "next/headers";
4
+ import type { Feedback } from "@/components/geistdocs/feedback";
5
+ import { siteId } from "@/geistdocs";
6
+ import { emotions } from "./emotions";
7
+
8
+ const protocol = process.env.NODE_ENV === "production" ? "https" : "http";
9
+ const baseUrl = `${protocol}://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`;
10
+
11
+ export const sendFeedback = async (
12
+ url: string,
13
+ feedback: Feedback
14
+ ): Promise<{ success: boolean }> => {
15
+ const emoji = emotions.find((e) => e.name === feedback.emotion)?.emoji;
16
+ const endpoint = new URL("/feedback", "https://geistdocs.com/feedback");
17
+ const headersList = await headers();
18
+
19
+ const response = await fetch(endpoint, {
20
+ method: "POST",
21
+ headers: {
22
+ "Content-Type": "application/json",
23
+ },
24
+ body: JSON.stringify({
25
+ note: feedback.message,
26
+ url: new URL(url, baseUrl).toString(),
27
+ emotion: emoji,
28
+ ua: headersList.get("user-agent") ?? undefined,
29
+ ip: headersList.get("x-real-ip") || headersList.get("x-forwarded-for"),
30
+ label: siteId,
31
+ }),
32
+ });
33
+
34
+ if (!response.ok) {
35
+ const error = await response.json();
36
+
37
+ console.error(error);
38
+
39
+ return { success: false };
40
+ }
41
+
42
+ return {
43
+ success: true,
44
+ };
45
+ };
@@ -0,0 +1,8 @@
1
+ import { createChatRoute } from "@vercel/geistdocs/routes/chat";
2
+ import { config } from "@/lib/geistdocs/config";
3
+ import { geistdocsSource } from "@/lib/geistdocs/source";
4
+
5
+ export const { POST, maxDuration } = createChatRoute({
6
+ config,
7
+ source: geistdocsSource,
8
+ });
@@ -0,0 +1,5 @@
1
+ import { createSearchRoute } from "@vercel/geistdocs/routes/search";
2
+ import { config } from "@/lib/geistdocs/config";
3
+ import { source } from "@/lib/geistdocs/source";
4
+
5
+ export const GET = createSearchRoute({ config, source });
Binary file
@@ -0,0 +1,2 @@
1
+ @import "tailwindcss";
2
+ @import "./styles/geistdocs.css";
@@ -0,0 +1,14 @@
1
+ import type { MetadataRoute } from "next";
2
+
3
+ const protocol = process.env.NODE_ENV === "production" ? "https" : "http";
4
+ const baseUrl = `${protocol}://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`;
5
+
6
+ export default function robots(): MetadataRoute.Robots {
7
+ return {
8
+ rules: {
9
+ userAgent: "*",
10
+ allow: "/",
11
+ },
12
+ sitemap: `${baseUrl}/sitemap.xml`,
13
+ };
14
+ }
@@ -0,0 +1,36 @@
1
+ import type { MetadataRoute } from "next";
2
+
3
+ import { source } from "@/lib/geistdocs/source";
4
+
5
+ const protocol = process.env.NODE_ENV === "production" ? "https" : "http";
6
+ const baseUrl = `${protocol}://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`;
7
+
8
+ export const revalidate = false;
9
+
10
+ export default function sitemap(): MetadataRoute.Sitemap {
11
+ const url = (path: string): string => new URL(path, baseUrl).toString();
12
+
13
+ const pages: MetadataRoute.Sitemap = [];
14
+
15
+ for (const page of source.getPages()) {
16
+ const data = page.data as {
17
+ lastModified?: Date;
18
+ };
19
+
20
+ pages.push({
21
+ changeFrequency: "weekly" as const,
22
+ lastModified: data.lastModified ? new Date(data.lastModified) : undefined,
23
+ priority: 0.5,
24
+ url: url(page.url),
25
+ });
26
+ }
27
+
28
+ return [
29
+ {
30
+ changeFrequency: "monthly",
31
+ priority: 1,
32
+ url: url("/"),
33
+ },
34
+ ...pages,
35
+ ];
36
+ }