@vercel/geistdocs 1.2.3 → 1.3.0-canary.41d37f1
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.
- package/dist/cli/index.js +3 -0
- package/dist/components/callout.d.ts +12 -0
- package/dist/components/callout.d.ts.map +1 -0
- package/dist/components/callout.js +7 -0
- package/dist/components/code-block-tabs.d.ts +7 -0
- package/dist/components/code-block-tabs.d.ts.map +1 -0
- package/dist/components/code-block-tabs.js +7 -0
- package/dist/components/code-block.d.ts +14 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +41 -0
- package/dist/components/mermaid.d.ts +4 -0
- package/dist/components/mermaid.d.ts.map +1 -0
- package/dist/components/mermaid.js +44 -0
- package/dist/components/theme-aware-image.d.ts +12 -0
- package/dist/components/theme-aware-image.d.ts.map +1 -0
- package/dist/components/theme-aware-image.js +8 -0
- package/dist/components/video.d.ts +6 -0
- package/dist/components/video.d.ts.map +1 -0
- package/dist/components/video.js +3 -0
- package/dist/config.d.ts +52 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1 -0
- package/dist/controls.d.ts +15 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/controls.js +52 -0
- package/dist/internal/chat/context.d.ts +19 -0
- package/dist/internal/chat/context.d.ts.map +1 -0
- package/dist/internal/chat/context.js +36 -0
- package/dist/internal/chat/conversation.d.ts +10 -0
- package/dist/internal/chat/conversation.d.ts.map +1 -0
- package/dist/internal/chat/conversation.js +16 -0
- package/dist/internal/chat/copy-chat.d.ts +5 -0
- package/dist/internal/chat/copy-chat.d.ts.map +1 -0
- package/dist/internal/chat/copy-chat.js +35 -0
- package/dist/internal/chat/db.d.ts +13 -0
- package/dist/internal/chat/db.d.ts.map +1 -0
- package/dist/internal/chat/db.js +19 -0
- package/dist/internal/chat/message-metadata.d.ts +8 -0
- package/dist/internal/chat/message-metadata.d.ts.map +1 -0
- package/dist/internal/chat/message-metadata.js +29 -0
- package/dist/internal/chat/message.d.ts +11 -0
- package/dist/internal/chat/message.d.ts.map +1 -0
- package/dist/internal/chat/message.js +11 -0
- package/dist/internal/chat/prompt-input.d.ts +13 -0
- package/dist/internal/chat/prompt-input.d.ts.map +1 -0
- package/dist/internal/chat/prompt-input.js +39 -0
- package/dist/internal/chat/shell.d.ts +2 -0
- package/dist/internal/chat/shell.d.ts.map +1 -0
- package/dist/internal/chat/shell.js +194 -0
- package/dist/internal/chat/shimmer.d.ts +11 -0
- package/dist/internal/chat/shimmer.d.ts.map +1 -0
- package/dist/internal/chat/shimmer.js +18 -0
- package/dist/internal/chat/sources.d.ts +13 -0
- package/dist/internal/chat/sources.d.ts.map +1 -0
- package/dist/internal/chat/sources.js +9 -0
- package/dist/internal/chat/suggestion.d.ts +11 -0
- package/dist/internal/chat/suggestion.d.ts.map +1 -0
- package/dist/internal/chat/suggestion.js +12 -0
- package/dist/internal/cn.d.ts +3 -0
- package/dist/internal/cn.d.ts.map +1 -0
- package/dist/internal/cn.js +3 -0
- package/dist/internal/feedback-action.d.ts +14 -0
- package/dist/internal/feedback-action.d.ts.map +1 -0
- package/dist/internal/feedback-action.js +34 -0
- package/dist/internal/i18n.d.ts +6 -0
- package/dist/internal/i18n.d.ts.map +1 -0
- package/dist/internal/i18n.js +18 -0
- package/dist/internal/languages.d.ts +7 -0
- package/dist/internal/languages.d.ts.map +1 -0
- package/dist/internal/languages.js +18 -0
- package/dist/internal/not-implemented.d.ts +2 -0
- package/dist/internal/not-implemented.d.ts.map +1 -0
- package/dist/internal/not-implemented.js +4 -0
- package/dist/internal/page-actions-client.d.ts +14 -0
- package/dist/internal/page-actions-client.d.ts.map +1 -0
- package/dist/internal/page-actions-client.js +154 -0
- package/dist/internal/page-actions.d.ts +18 -0
- package/dist/internal/page-actions.d.ts.map +1 -0
- package/dist/internal/page-actions.js +4 -0
- package/dist/internal/search.d.ts +5 -0
- package/dist/internal/search.d.ts.map +1 -0
- package/dist/internal/search.js +14 -0
- package/dist/internal/sidebar.d.ts +6 -0
- package/dist/internal/sidebar.d.ts.map +1 -0
- package/dist/internal/sidebar.js +37 -0
- package/dist/internal/ui/button-group.d.ts +13 -0
- package/dist/internal/ui/button-group.d.ts.map +1 -0
- package/dist/internal/ui/button-group.js +26 -0
- package/dist/internal/ui/button.d.ts +12 -0
- package/dist/internal/ui/button.d.ts.map +1 -0
- package/dist/internal/ui/button.js +33 -0
- package/dist/internal/ui/card.d.ts +6 -0
- package/dist/internal/ui/card.d.ts.map +1 -0
- package/dist/internal/ui/card.js +14 -0
- package/dist/internal/ui/collapsible.d.ts +6 -0
- package/dist/internal/ui/collapsible.d.ts.map +1 -0
- package/dist/internal/ui/collapsible.js +12 -0
- package/dist/internal/ui/drawer.d.ts +6 -0
- package/dist/internal/ui/drawer.d.ts.map +1 -0
- package/dist/internal/ui/drawer.js +13 -0
- package/dist/internal/ui/dropdown-menu.d.ts +22 -0
- package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/internal/ui/dropdown-menu.js +41 -0
- package/dist/internal/ui/input-group.d.ts +15 -0
- package/dist/internal/ui/input-group.d.ts.map +1 -0
- package/dist/internal/ui/input-group.js +44 -0
- package/dist/internal/ui/input.d.ts +3 -0
- package/dist/internal/ui/input.d.ts.map +1 -0
- package/dist/internal/ui/input.js +5 -0
- package/dist/internal/ui/kbd.d.ts +4 -0
- package/dist/internal/ui/kbd.d.ts.map +1 -0
- package/dist/internal/ui/kbd.js +8 -0
- package/dist/internal/ui/popover.d.ts +6 -0
- package/dist/internal/ui/popover.d.ts.map +1 -0
- package/dist/internal/ui/popover.js +13 -0
- package/dist/internal/ui/scroll-area.d.ts +5 -0
- package/dist/internal/ui/scroll-area.d.ts.map +1 -0
- package/dist/internal/ui/scroll-area.js +12 -0
- package/dist/internal/ui/separator.d.ts +4 -0
- package/dist/internal/ui/separator.d.ts.map +1 -0
- package/dist/internal/ui/separator.js +7 -0
- package/dist/internal/ui/sheet.d.ts +10 -0
- package/dist/internal/ui/sheet.d.ts.map +1 -0
- package/dist/internal/ui/sheet.js +24 -0
- package/dist/internal/ui/sonner.d.ts +3 -0
- package/dist/internal/ui/sonner.d.ts.map +1 -0
- package/dist/internal/ui/sonner.js +20 -0
- package/dist/internal/ui/spinner.d.ts +3 -0
- package/dist/internal/ui/spinner.d.ts.map +1 -0
- package/dist/internal/ui/spinner.js +6 -0
- package/dist/internal/ui/textarea.d.ts +3 -0
- package/dist/internal/ui/textarea.d.ts.map +1 -0
- package/dist/internal/ui/textarea.js +5 -0
- package/dist/internal/ui/tooltip.d.ts +7 -0
- package/dist/internal/ui/tooltip.d.ts.map +1 -0
- package/dist/internal/ui/tooltip.js +16 -0
- package/dist/internal/use-mobile.d.ts +2 -0
- package/dist/internal/use-mobile.d.ts.map +1 -0
- package/dist/internal/use-mobile.js +16 -0
- package/dist/layout.d.ts +18 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +49 -0
- package/dist/mdx.d.ts +36 -0
- package/dist/mdx.d.ts.map +1 -0
- package/dist/mdx.js +72 -0
- package/dist/pages/docs.d.ts +55 -0
- package/dist/pages/docs.d.ts.map +1 -0
- package/dist/pages/docs.js +63 -0
- package/dist/proxy.d.ts +21 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +109 -0
- package/dist/routes/chat.d.ts +13 -0
- package/dist/routes/chat.d.ts.map +1 -0
- package/dist/routes/chat.js +229 -0
- package/dist/routes/llms.d.ts +33 -0
- package/dist/routes/llms.d.ts.map +1 -0
- package/dist/routes/llms.js +39 -0
- package/dist/routes/search.d.ts +10 -0
- package/dist/routes/search.d.ts.map +1 -0
- package/dist/routes/search.js +33 -0
- package/dist/routes/sitemap.d.ts +35 -0
- package/dist/routes/sitemap.d.ts.map +1 -0
- package/dist/routes/sitemap.js +150 -0
- package/dist/source.d.ts +30 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +72 -0
- package/package.json +129 -9
- package/styles.css +193 -0
- package/template/_gitignore +1 -0
- package/template/app/[lang]/(home)/components/centered-section.tsx +26 -0
- package/template/app/[lang]/(home)/components/cta.tsx +19 -0
- package/template/app/[lang]/(home)/components/hero.tsx +27 -0
- package/template/app/[lang]/(home)/components/one-two-section.tsx +25 -0
- package/template/app/[lang]/(home)/components/templates.tsx +50 -0
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
- package/template/app/[lang]/(home)/layout.tsx +14 -0
- package/template/app/[lang]/(home)/page.tsx +126 -0
- package/template/app/[lang]/docs/[[...slug]]/page.tsx +19 -0
- package/template/app/[lang]/docs/layout.tsx +14 -0
- package/template/app/[lang]/layout.tsx +29 -0
- package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
- package/template/app/[lang]/llms.txt/route.ts +6 -0
- package/template/app/[lang]/og/[...slug]/background.png +0 -0
- package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
- package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
- package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
- package/template/app/[lang]/rss.xml/route.ts +52 -0
- package/template/app/[lang]/sitemap.md/route.ts +9 -0
- package/template/app/actions/feedback/emotions.ts +18 -0
- package/template/app/actions/feedback/index.ts +45 -0
- package/template/app/api/chat/route.ts +8 -0
- package/template/app/api/search/route.ts +5 -0
- package/template/app/favicon.ico +0 -0
- package/template/app/global.css +2 -0
- package/template/app/robots.ts +14 -0
- package/template/app/sitemap.ts +36 -0
- package/template/app/styles/geistdocs.css +553 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +35 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +30 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +25 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +36 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx +11 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx +14 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +29 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +38 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +42 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +42 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +31 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +29 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +24 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +73 -0
- package/template/components/geistdocs/callout.tsx +40 -0
- package/template/components/geistdocs/chat.tsx +24 -0
- package/template/components/geistdocs/code-block-tabs.tsx +61 -0
- package/template/components/geistdocs/code-block.tsx +134 -0
- package/template/components/geistdocs/copy-page.tsx +27 -0
- package/template/components/geistdocs/desktop-menu.tsx +52 -0
- package/template/components/geistdocs/docs-layout.tsx +20 -0
- package/template/components/geistdocs/docs-page.tsx +35 -0
- package/template/components/geistdocs/edit-source.tsx +30 -0
- package/template/components/geistdocs/feedback.tsx +139 -0
- package/template/components/geistdocs/footer.tsx +30 -0
- package/template/components/geistdocs/github-button.tsx +19 -0
- package/template/components/geistdocs/home-layout.tsx +46 -0
- package/template/components/geistdocs/icons.tsx +13 -0
- package/template/components/geistdocs/installer.tsx +58 -0
- package/template/components/geistdocs/language-selector.tsx +3 -0
- package/template/components/geistdocs/mdx-components.tsx +5 -0
- package/template/components/geistdocs/mermaid.tsx +68 -0
- package/template/components/geistdocs/mobile-docs-bar.tsx +81 -0
- package/template/components/geistdocs/mobile-menu.tsx +150 -0
- package/template/components/geistdocs/navbar-logo.tsx +124 -0
- package/template/components/geistdocs/navbar.tsx +22 -0
- package/template/components/geistdocs/provider.tsx +31 -0
- package/template/components/geistdocs/rss-button.tsx +10 -0
- package/template/components/geistdocs/scroll-top.tsx +21 -0
- package/template/components/geistdocs/search.tsx +17 -0
- package/template/components/geistdocs/sidebar.tsx +128 -0
- package/template/components/geistdocs/theme-aware-image.tsx +22 -0
- package/template/components/geistdocs/theme-toggle.tsx +3 -0
- package/template/components/geistdocs/video.tsx +16 -0
- package/template/components/ui/badge.tsx +46 -0
- package/template/components/ui/button-group.tsx +83 -0
- package/template/components/ui/button.tsx +60 -0
- package/template/components/ui/card.tsx +92 -0
- package/template/components/ui/collapsible.tsx +33 -0
- package/template/components/ui/command-prompt.tsx +488 -0
- package/template/components/ui/command.tsx +184 -0
- package/template/components/ui/dialog.tsx +143 -0
- package/template/components/ui/drawer.tsx +135 -0
- package/template/components/ui/dropdown-menu.tsx +257 -0
- package/template/components/ui/hover-card.tsx +44 -0
- package/template/components/ui/input-group.tsx +170 -0
- package/template/components/ui/input.tsx +21 -0
- package/template/components/ui/kbd.tsx +28 -0
- package/template/components/ui/navigation-menu.tsx +192 -0
- package/template/components/ui/popover.tsx +48 -0
- package/template/components/ui/scroll-area.tsx +58 -0
- package/template/components/ui/select.tsx +187 -0
- package/template/components/ui/separator.tsx +28 -0
- package/template/components/ui/sheet.tsx +139 -0
- package/template/components/ui/sonner.tsx +40 -0
- package/template/components/ui/spinner.tsx +16 -0
- package/template/components/ui/textarea.tsx +18 -0
- package/template/components/ui/tooltip.tsx +61 -0
- package/template/components.json +22 -0
- package/template/content/docs/ask-ai.cn.mdx +85 -0
- package/template/content/docs/ask-ai.mdx +85 -0
- package/template/content/docs/configuration.cn.mdx +115 -0
- package/template/content/docs/configuration.mdx +115 -0
- package/template/content/docs/deployment.cn.mdx +34 -0
- package/template/content/docs/deployment.mdx +34 -0
- package/template/content/docs/edit-on-github.cn.mdx +47 -0
- package/template/content/docs/edit-on-github.mdx +47 -0
- package/template/content/docs/env.cn.mdx +25 -0
- package/template/content/docs/env.mdx +25 -0
- package/template/content/docs/feedback.cn.mdx +85 -0
- package/template/content/docs/feedback.mdx +85 -0
- package/template/content/docs/getting-started.cn.mdx +86 -0
- package/template/content/docs/getting-started.mdx +86 -0
- package/template/content/docs/index.cn.mdx +54 -0
- package/template/content/docs/index.mdx +87 -0
- package/template/content/docs/internationalization.cn.mdx +113 -0
- package/template/content/docs/internationalization.mdx +117 -0
- package/template/content/docs/llms-txt.cn.mdx +50 -0
- package/template/content/docs/llms-txt.mdx +50 -0
- package/template/content/docs/md.cn.mdx +68 -0
- package/template/content/docs/md.mdx +68 -0
- package/template/content/docs/meta.json +21 -0
- package/template/content/docs/open-in-chat.cn.mdx +78 -0
- package/template/content/docs/open-in-chat.mdx +78 -0
- package/template/content/docs/provider.cn.mdx +69 -0
- package/template/content/docs/provider.mdx +69 -0
- package/template/content/docs/rss.cn.mdx +104 -0
- package/template/content/docs/rss.mdx +104 -0
- package/template/content/docs/syntax.cn.mdx +416 -0
- package/template/content/docs/syntax.mdx +407 -0
- package/template/content/docs/theme-aware-image.mdx +53 -0
- package/template/geistdocs.tsx +51 -0
- package/template/hooks/geistdocs/use-sidebar.ts +13 -0
- package/template/hooks/use-mobile.ts +19 -0
- package/template/lib/geistdocs/config.tsx +27 -0
- package/template/lib/geistdocs/fonts.ts +18 -0
- package/template/lib/geistdocs/i18n.ts +13 -0
- package/template/lib/geistdocs/md-tracking.ts +56 -0
- package/template/lib/geistdocs/source.ts +12 -0
- package/template/lib/utils.ts +6 -0
- package/template/next.config.ts +22 -0
- package/template/package.json +63 -0
- package/template/postcss.config.mjs +5 -0
- package/template/proxy.ts +16 -0
- package/template/source.config.ts +62 -0
- package/template/tsconfig.json +37 -0
- package/dist/index.js +0 -2
- /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
package/dist/source.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type InferPageType, loader } from "fumadocs-core/source";
|
|
2
|
+
import type { GeistdocsConfig } from "./config";
|
|
3
|
+
type LoaderOptions = Parameters<typeof loader>[0];
|
|
4
|
+
interface FumadocsCollection {
|
|
5
|
+
toFumadocsSource(): LoaderOptions["source"];
|
|
6
|
+
}
|
|
7
|
+
interface CreateSourceOptions {
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
config: Pick<GeistdocsConfig, "basePath" | "defaultLanguage" | "translations">;
|
|
10
|
+
docs: FumadocsCollection;
|
|
11
|
+
}
|
|
12
|
+
export declare const createSource: ({ docs, config, baseUrl, }: CreateSourceOptions) => {
|
|
13
|
+
source: import("fumadocs-core/source").LoaderOutput<{
|
|
14
|
+
source: import("fumadocs-core/source").SourceConfig;
|
|
15
|
+
i18n: import("fumadocs-core/i18n").I18nConfig<string>;
|
|
16
|
+
}>;
|
|
17
|
+
getPageImage: (page: InferPageType<import("fumadocs-core/source").LoaderOutput<{
|
|
18
|
+
source: import("fumadocs-core/source").SourceConfig;
|
|
19
|
+
i18n: import("fumadocs-core/i18n").I18nConfig<string>;
|
|
20
|
+
}>>) => {
|
|
21
|
+
segments: string[];
|
|
22
|
+
url: string;
|
|
23
|
+
};
|
|
24
|
+
getPageMarkdown: (page: InferPageType<import("fumadocs-core/source").LoaderOutput<{
|
|
25
|
+
source: import("fumadocs-core/source").SourceConfig;
|
|
26
|
+
i18n: import("fumadocs-core/i18n").I18nConfig<string>;
|
|
27
|
+
}>>) => Promise<string>;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAElD,UAAU,kBAAkB;IAC1B,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;CAC7C;AAED,UAAU,mBAAmB;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,IAAI,CACV,eAAe,EACf,UAAU,GAAG,iBAAiB,GAAG,cAAc,CAChD,CAAC;IACF,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAyBD,eAAO,MAAM,YAAY,GAAI,4BAI1B,mBAAmB;;;;;yBAeQ,aAAa;;;OAAe;;;;4BAWnB,aAAa;;;OAAe;CAiDlE,CAAC"}
|
package/dist/source.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineI18n } from "fumadocs-core/i18n";
|
|
2
|
+
import { loader } from "fumadocs-core/source";
|
|
3
|
+
import { lucideIconsPlugin } from "fumadocs-core/source/lucide-icons";
|
|
4
|
+
const getLanguages = (config) => {
|
|
5
|
+
const defaultLanguage = config.defaultLanguage ?? "en";
|
|
6
|
+
const languages = Object.keys(config.translations ?? {});
|
|
7
|
+
return {
|
|
8
|
+
defaultLanguage,
|
|
9
|
+
languages: Array.from(new Set([defaultLanguage, ...languages])),
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export const createSource = ({ docs, config, baseUrl = "/docs", }) => {
|
|
13
|
+
const { defaultLanguage, languages } = getLanguages(config);
|
|
14
|
+
const i18n = defineI18n({
|
|
15
|
+
defaultLanguage,
|
|
16
|
+
languages,
|
|
17
|
+
hideLocale: "default-locale",
|
|
18
|
+
});
|
|
19
|
+
const source = loader({
|
|
20
|
+
i18n,
|
|
21
|
+
baseUrl,
|
|
22
|
+
source: docs.toFumadocsSource(),
|
|
23
|
+
plugins: [lucideIconsPlugin()],
|
|
24
|
+
});
|
|
25
|
+
const getPageImage = (page) => {
|
|
26
|
+
const segments = [...page.slugs, "image.png"];
|
|
27
|
+
return {
|
|
28
|
+
segments,
|
|
29
|
+
url: config.basePath
|
|
30
|
+
? `${config.basePath}/og/${segments.join("/")}`
|
|
31
|
+
: `/og/${segments.join("/")}`,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const getPageMarkdown = async (page) => {
|
|
35
|
+
const data = page.data;
|
|
36
|
+
const processed = await data.getText("processed");
|
|
37
|
+
const { title, description, product, type, summary, prerequisites, related, } = data;
|
|
38
|
+
const frontmatter = [
|
|
39
|
+
"---",
|
|
40
|
+
`title: ${title}`,
|
|
41
|
+
description && `description: ${description}`,
|
|
42
|
+
product && `product: ${product}`,
|
|
43
|
+
type && `type: ${type}`,
|
|
44
|
+
summary && `summary: ${summary}`,
|
|
45
|
+
prerequisites?.length &&
|
|
46
|
+
`prerequisites:\n${prerequisites
|
|
47
|
+
.map((prerequisite) => ` - ${prerequisite}`)
|
|
48
|
+
.join("\n")}`,
|
|
49
|
+
related?.length &&
|
|
50
|
+
`related:\n${related.map((entry) => ` - ${entry}`).join("\n")}`,
|
|
51
|
+
"---",
|
|
52
|
+
]
|
|
53
|
+
.filter(Boolean)
|
|
54
|
+
.join("\n");
|
|
55
|
+
return `${frontmatter}
|
|
56
|
+
|
|
57
|
+
# ${title}
|
|
58
|
+
|
|
59
|
+
${processed}
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)
|
|
64
|
+
|
|
65
|
+
For an index of all available documentation, see [/llms.txt](/llms.txt)`;
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
source,
|
|
69
|
+
getPageImage,
|
|
70
|
+
getPageMarkdown,
|
|
71
|
+
};
|
|
72
|
+
};
|
package/package.json
CHANGED
|
@@ -1,28 +1,148 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/geistdocs",
|
|
3
|
-
"description": "CLI for Geistdocs projects
|
|
4
|
-
"version": "1.
|
|
3
|
+
"description": "Runtime and CLI for Geistdocs projects.",
|
|
4
|
+
"version": "1.3.0-canary.41d37f1",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/vercel/geistdocs",
|
|
8
|
+
"directory": "packages/geistdocs"
|
|
9
|
+
},
|
|
5
10
|
"type": "module",
|
|
6
11
|
"bin": {
|
|
7
|
-
"geistdocs": "dist/index.js"
|
|
12
|
+
"geistdocs": "dist/cli/index.js"
|
|
8
13
|
},
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"./styles.css"
|
|
16
|
+
],
|
|
9
17
|
"files": [
|
|
10
|
-
"dist"
|
|
18
|
+
"dist",
|
|
19
|
+
"template",
|
|
20
|
+
"styles.css"
|
|
11
21
|
],
|
|
22
|
+
"exports": {
|
|
23
|
+
"./config": {
|
|
24
|
+
"types": "./dist/config.d.ts",
|
|
25
|
+
"default": "./dist/config.js"
|
|
26
|
+
},
|
|
27
|
+
"./layout": {
|
|
28
|
+
"types": "./dist/layout.d.ts",
|
|
29
|
+
"default": "./dist/layout.js"
|
|
30
|
+
},
|
|
31
|
+
"./controls": {
|
|
32
|
+
"types": "./dist/controls.d.ts",
|
|
33
|
+
"default": "./dist/controls.js"
|
|
34
|
+
},
|
|
35
|
+
"./source": {
|
|
36
|
+
"types": "./dist/source.d.ts",
|
|
37
|
+
"default": "./dist/source.js"
|
|
38
|
+
},
|
|
39
|
+
"./pages/docs": {
|
|
40
|
+
"types": "./dist/pages/docs.d.ts",
|
|
41
|
+
"default": "./dist/pages/docs.js"
|
|
42
|
+
},
|
|
43
|
+
"./routes/chat": {
|
|
44
|
+
"types": "./dist/routes/chat.d.ts",
|
|
45
|
+
"default": "./dist/routes/chat.js"
|
|
46
|
+
},
|
|
47
|
+
"./routes/search": {
|
|
48
|
+
"types": "./dist/routes/search.d.ts",
|
|
49
|
+
"default": "./dist/routes/search.js"
|
|
50
|
+
},
|
|
51
|
+
"./routes/llms": {
|
|
52
|
+
"types": "./dist/routes/llms.d.ts",
|
|
53
|
+
"default": "./dist/routes/llms.js"
|
|
54
|
+
},
|
|
55
|
+
"./routes/sitemap": {
|
|
56
|
+
"types": "./dist/routes/sitemap.d.ts",
|
|
57
|
+
"default": "./dist/routes/sitemap.js"
|
|
58
|
+
},
|
|
59
|
+
"./proxy": {
|
|
60
|
+
"types": "./dist/proxy.d.ts",
|
|
61
|
+
"default": "./dist/proxy.js"
|
|
62
|
+
},
|
|
63
|
+
"./mdx": {
|
|
64
|
+
"types": "./dist/mdx.d.ts",
|
|
65
|
+
"default": "./dist/mdx.js"
|
|
66
|
+
},
|
|
67
|
+
"./components/callout": {
|
|
68
|
+
"types": "./dist/components/callout.d.ts",
|
|
69
|
+
"default": "./dist/components/callout.js"
|
|
70
|
+
},
|
|
71
|
+
"./components/code-block": {
|
|
72
|
+
"types": "./dist/components/code-block.d.ts",
|
|
73
|
+
"default": "./dist/components/code-block.js"
|
|
74
|
+
},
|
|
75
|
+
"./components/code-block-tabs": {
|
|
76
|
+
"types": "./dist/components/code-block-tabs.d.ts",
|
|
77
|
+
"default": "./dist/components/code-block-tabs.js"
|
|
78
|
+
},
|
|
79
|
+
"./components/theme-aware-image": {
|
|
80
|
+
"types": "./dist/components/theme-aware-image.d.ts",
|
|
81
|
+
"default": "./dist/components/theme-aware-image.js"
|
|
82
|
+
},
|
|
83
|
+
"./components/mermaid": {
|
|
84
|
+
"types": "./dist/components/mermaid.d.ts",
|
|
85
|
+
"default": "./dist/components/mermaid.js"
|
|
86
|
+
},
|
|
87
|
+
"./components/video": {
|
|
88
|
+
"types": "./dist/components/video.d.ts",
|
|
89
|
+
"default": "./dist/components/video.js"
|
|
90
|
+
},
|
|
91
|
+
"./styles.css": "./styles.css",
|
|
92
|
+
"./package.json": "./package.json"
|
|
93
|
+
},
|
|
94
|
+
"scripts": {
|
|
95
|
+
"build": "rm -rf dist template && node ./scripts/bundle-template.mjs && tsc -p tsconfig.runtime.json && tsup --config tsup.config.cli.ts"
|
|
96
|
+
},
|
|
12
97
|
"dependencies": {
|
|
98
|
+
"@ai-sdk/react": "^2.0.115",
|
|
13
99
|
"@clack/prompts": "^0.11.0",
|
|
100
|
+
"@icons-pack/react-simple-icons": "^13.8.0",
|
|
101
|
+
"@orama/tokenizers": "^3.1.16",
|
|
102
|
+
"@streamdown/cjk": "^1.0.1",
|
|
103
|
+
"@streamdown/code": "^1.0.1",
|
|
104
|
+
"@vercel/agent-readability": "^0.2.1",
|
|
105
|
+
"ai": "^5.0.106",
|
|
106
|
+
"class-variance-authority": "^0.7.1",
|
|
107
|
+
"clsx": "^2.1.1",
|
|
14
108
|
"commander": "^14.0.2",
|
|
109
|
+
"dexie": "^4.2.1",
|
|
110
|
+
"dexie-react-hooks": "^4.2.0",
|
|
111
|
+
"fumadocs-core": "16.2.2",
|
|
112
|
+
"fumadocs-mdx": "14.0.4",
|
|
113
|
+
"fumadocs-ui": "16.2.2",
|
|
15
114
|
"glob": "^11.0.0",
|
|
16
|
-
"
|
|
115
|
+
"lucide-react": "^0.555.0",
|
|
116
|
+
"mermaid": "^11.12.2",
|
|
117
|
+
"motion": "^12.23.25",
|
|
118
|
+
"next-themes": "^0.4.6",
|
|
119
|
+
"radix-ui": "latest",
|
|
120
|
+
"react-player": "^3.4.0",
|
|
121
|
+
"sonner": "^2.0.7",
|
|
122
|
+
"streamdown": "^2.1.0",
|
|
123
|
+
"tailwind-merge": "^3.4.0",
|
|
124
|
+
"ts-morph": "^27.0.2",
|
|
125
|
+
"tw-animate-css": "^1.4.0",
|
|
126
|
+
"use-stick-to-bottom": "^1.1.1",
|
|
127
|
+
"vaul": "^1.1.2",
|
|
128
|
+
"zod": "^4.1.13"
|
|
129
|
+
},
|
|
130
|
+
"peerDependencies": {
|
|
131
|
+
"next": "16.0.10",
|
|
132
|
+
"react": "^19.2.3",
|
|
133
|
+
"react-dom": "^19.2.3"
|
|
17
134
|
},
|
|
18
135
|
"devDependencies": {
|
|
19
136
|
"@biomejs/biome": "^2.3.8",
|
|
20
137
|
"@types/glob": "^9.0.0",
|
|
138
|
+
"@types/mdx": "^2.0.13",
|
|
21
139
|
"@types/node": "^24.10.1",
|
|
140
|
+
"@types/react": "^19.2.7",
|
|
141
|
+
"@types/react-dom": "^19.2.3",
|
|
142
|
+
"next": "16.0.10",
|
|
143
|
+
"react": "^19.2.3",
|
|
144
|
+
"react-dom": "^19.2.3",
|
|
22
145
|
"tsup": "^8.5.1",
|
|
23
146
|
"typescript": "^5.9.3"
|
|
24
|
-
},
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "tsup"
|
|
27
147
|
}
|
|
28
|
-
}
|
|
148
|
+
}
|
package/styles.css
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "fumadocs-ui/css/shadcn.css";
|
|
3
|
+
@import "fumadocs-ui/css/preset.css";
|
|
4
|
+
@import "tw-animate-css";
|
|
5
|
+
|
|
6
|
+
@custom-variant dark (&:is(.dark *));
|
|
7
|
+
|
|
8
|
+
@theme inline {
|
|
9
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
10
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
11
|
+
--radius-lg: var(--radius);
|
|
12
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
13
|
+
--color-background: var(--background);
|
|
14
|
+
--color-foreground: var(--foreground);
|
|
15
|
+
--color-card: var(--card);
|
|
16
|
+
--color-card-foreground: var(--card-foreground);
|
|
17
|
+
--color-popover: var(--popover);
|
|
18
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
19
|
+
--color-primary: var(--primary);
|
|
20
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
21
|
+
--color-secondary: var(--secondary);
|
|
22
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
23
|
+
--color-muted: var(--muted);
|
|
24
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
25
|
+
--color-accent: var(--accent);
|
|
26
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
27
|
+
--color-destructive: var(--destructive);
|
|
28
|
+
--color-border: var(--border);
|
|
29
|
+
--color-input: var(--input);
|
|
30
|
+
--color-ring: var(--ring);
|
|
31
|
+
--color-chart-1: var(--chart-1);
|
|
32
|
+
--color-chart-2: var(--chart-2);
|
|
33
|
+
--color-chart-3: var(--chart-3);
|
|
34
|
+
--color-chart-4: var(--chart-4);
|
|
35
|
+
--color-chart-5: var(--chart-5);
|
|
36
|
+
--color-sidebar: var(--sidebar);
|
|
37
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
38
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
39
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
40
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
41
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
42
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
43
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:root {
|
|
47
|
+
--radius: 0.625rem;
|
|
48
|
+
--background: oklch(1 0 0);
|
|
49
|
+
--foreground: oklch(0.145 0 0);
|
|
50
|
+
--card: oklch(1 0 0);
|
|
51
|
+
--card-foreground: oklch(0.145 0 0);
|
|
52
|
+
--popover: oklch(1 0 0);
|
|
53
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
54
|
+
--primary: oklch(57.61% 0.2508 258.23);
|
|
55
|
+
--primary-foreground: oklch(1 0 0);
|
|
56
|
+
--secondary: oklch(0.97 0 0);
|
|
57
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
58
|
+
--muted: oklch(0.97 0 0);
|
|
59
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
60
|
+
--accent: oklch(0.97 0 0);
|
|
61
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
62
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
63
|
+
--border: oklch(0.922 0 0);
|
|
64
|
+
--input: oklch(0.922 0 0);
|
|
65
|
+
--ring: oklch(0.708 0 0);
|
|
66
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
67
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
68
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
69
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
70
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
71
|
+
--sidebar: oklch(0.985 0 0);
|
|
72
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
73
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
74
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
75
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
76
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
77
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
78
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dark {
|
|
82
|
+
--background: oklch(0.145 0 0);
|
|
83
|
+
--foreground: oklch(0.985 0 0);
|
|
84
|
+
--card: oklch(0.205 0 0);
|
|
85
|
+
--card-foreground: oklch(0.985 0 0);
|
|
86
|
+
--popover: oklch(0.205 0 0);
|
|
87
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
88
|
+
--primary: oklch(57.61% 0.2508 258.23);
|
|
89
|
+
--primary-foreground: oklch(1 0 0);
|
|
90
|
+
--secondary: oklch(0.269 0 0);
|
|
91
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
92
|
+
--muted: oklch(0.269 0 0);
|
|
93
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
94
|
+
--accent: oklch(0.269 0 0);
|
|
95
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
96
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
97
|
+
--border: oklch(1 0 0 / 10%);
|
|
98
|
+
--input: oklch(1 0 0 / 15%);
|
|
99
|
+
--ring: oklch(0.556 0 0);
|
|
100
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
101
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
102
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
103
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
104
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
105
|
+
--sidebar: oklch(0.205 0 0);
|
|
106
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
107
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
108
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
109
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
110
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
111
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
112
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@layer base {
|
|
116
|
+
* {
|
|
117
|
+
@apply border-border outline-ring/50;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
body {
|
|
121
|
+
@apply bg-background text-foreground;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@layer base {
|
|
126
|
+
::after,
|
|
127
|
+
::before,
|
|
128
|
+
::backdrop,
|
|
129
|
+
::file-selector-button {
|
|
130
|
+
@apply border-border;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
* {
|
|
134
|
+
@apply min-w-0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
html {
|
|
138
|
+
text-rendering: optimizelegibility;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
body {
|
|
142
|
+
@apply min-h-dvh;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
input::placeholder,
|
|
146
|
+
textarea::placeholder {
|
|
147
|
+
@apply text-muted-foreground;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
button:not(:disabled),
|
|
151
|
+
[role="button"]:not(:disabled) {
|
|
152
|
+
@apply cursor-pointer;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.prose h1,
|
|
157
|
+
.prose h2,
|
|
158
|
+
.prose h3,
|
|
159
|
+
.prose h4,
|
|
160
|
+
.prose h5,
|
|
161
|
+
.prose h6 {
|
|
162
|
+
@apply tracking-tight;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@layer utilities {
|
|
166
|
+
.line-numbers code {
|
|
167
|
+
counter-reset: step;
|
|
168
|
+
counter-increment: step 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.line-numbers code .line::before {
|
|
172
|
+
content: counter(step);
|
|
173
|
+
counter-increment: step;
|
|
174
|
+
@apply mr-6 inline-block w-6 text-right tabular-nums text-muted-foreground;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:root {
|
|
179
|
+
--fd-layout-width: 100%;
|
|
180
|
+
--fd-page-width: 100%;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
#nd-docs-layout > div[data-state] {
|
|
184
|
+
@apply top-16;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
#nd-sidebar-mobile {
|
|
188
|
+
@apply mt-16;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
#nd-sidebar-mobile > div:first-child > div:first-child {
|
|
192
|
+
@apply hidden;
|
|
193
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vercel
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
interface CenteredSectionProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
description: string;
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const CenteredSection = ({
|
|
10
|
+
title,
|
|
11
|
+
description,
|
|
12
|
+
children,
|
|
13
|
+
}: CenteredSectionProps) => (
|
|
14
|
+
<div className="grid items-center gap-10 overflow-hidden px-4 py-8 sm:px-12 sm:py-12">
|
|
15
|
+
<div className="mx-auto grid max-w-lg gap-4 text-center">
|
|
16
|
+
<h2 className="font-semibold text-xl tracking-tight sm:text-2xl md:text-3xl lg:text-[40px]">
|
|
17
|
+
{title}
|
|
18
|
+
</h2>
|
|
19
|
+
<p className="text-balance text-lg text-muted-foreground">
|
|
20
|
+
{description}
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
{children}
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import DynamicLink from "fumadocs-core/dynamic-link";
|
|
2
|
+
import { Button } from "@/components/ui/button";
|
|
3
|
+
|
|
4
|
+
interface CTAProps {
|
|
5
|
+
cta: string;
|
|
6
|
+
href: string;
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const CTA = ({ title, href, cta }: CTAProps) => (
|
|
11
|
+
<section className="flex flex-col gap-4 px-8 py-10 sm:px-12 md:flex-row md:items-center md:justify-between">
|
|
12
|
+
<h2 className="font-semibold text-xl tracking-tight sm:text-2xl md:text-3xl lg:text-[40px]">
|
|
13
|
+
{title}
|
|
14
|
+
</h2>
|
|
15
|
+
<Button asChild size="lg">
|
|
16
|
+
<DynamicLink href={`/[lang]${href}`}>{cta}</DynamicLink>
|
|
17
|
+
</Button>
|
|
18
|
+
</section>
|
|
19
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { Badge } from "@/components/ui/badge";
|
|
3
|
+
|
|
4
|
+
interface HeroProps {
|
|
5
|
+
badge: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
description: string;
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Hero = ({ badge, title, description, children }: HeroProps) => (
|
|
12
|
+
<section className="mt-(--fd-nav-height) space-y-6 px-4 pt-16 pb-16 text-center sm:pt-24">
|
|
13
|
+
<div className="mx-auto w-full max-w-4xl space-y-5">
|
|
14
|
+
<Badge className="rounded-full" variant="secondary">
|
|
15
|
+
<div className="size-2 rounded-full bg-muted-foreground" />
|
|
16
|
+
<p>{badge}</p>
|
|
17
|
+
</Badge>
|
|
18
|
+
<h1 className="text-balance text-center font-semibold text-[40px]! leading-[1.1] tracking-tight sm:text-5xl! lg:font-semibold xl:text-6xl!">
|
|
19
|
+
{title}
|
|
20
|
+
</h1>
|
|
21
|
+
<p className="mx-auto max-w-3xl text-balance text-muted-foreground leading-relaxed sm:text-xl">
|
|
22
|
+
{description}
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
{children}
|
|
26
|
+
</section>
|
|
27
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
interface OneTwoSectionProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
description: string;
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const OneTwoSection = ({
|
|
10
|
+
title,
|
|
11
|
+
description,
|
|
12
|
+
children,
|
|
13
|
+
}: OneTwoSectionProps) => (
|
|
14
|
+
<div className="grid gap-12 p-8 sm:grid-cols-3 sm:gap-0 sm:divide-x sm:p-0">
|
|
15
|
+
<div className="flex flex-col gap-2 text-balance sm:p-12">
|
|
16
|
+
<h2 className="font-semibold text-xl tracking-tight sm:text-2xl md:text-3xl">
|
|
17
|
+
{title}
|
|
18
|
+
</h2>
|
|
19
|
+
<p className="mt-2 text-balance text-lg text-muted-foreground">
|
|
20
|
+
{description}
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
<div className="sm:col-span-2 sm:p-12">{children}</div>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import Image from "next/image";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
|
|
4
|
+
interface TemplatesProps {
|
|
5
|
+
data: {
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
link: string;
|
|
9
|
+
image: string;
|
|
10
|
+
}[];
|
|
11
|
+
description: string;
|
|
12
|
+
title: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const Templates = ({ title, description, data }: TemplatesProps) => (
|
|
16
|
+
<div className="grid gap-12 p-8 px-4 py-8 sm:p-12 sm:px-12 sm:py-12">
|
|
17
|
+
<div className="grid max-w-3xl gap-2 text-balance">
|
|
18
|
+
<h2 className="font-semibold text-xl tracking-tight sm:text-2xl md:text-3xl lg:text-[40px]">
|
|
19
|
+
{title}
|
|
20
|
+
</h2>
|
|
21
|
+
<p className="text-balance text-lg text-muted-foreground">
|
|
22
|
+
{description}
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
<div className="grid gap-8 md:grid-cols-3">
|
|
26
|
+
{data.map((item) => (
|
|
27
|
+
<a
|
|
28
|
+
className="group flex-col overflow-hidden rounded-lg border bg-background p-4"
|
|
29
|
+
href={item.link}
|
|
30
|
+
key={item.title}
|
|
31
|
+
>
|
|
32
|
+
<h3 className="font-medium tracking-tight">{item.title}</h3>
|
|
33
|
+
<p className="line-clamp-2 text-muted-foreground text-sm">
|
|
34
|
+
{item.description}
|
|
35
|
+
</p>
|
|
36
|
+
<Image
|
|
37
|
+
alt={item.title}
|
|
38
|
+
className={cn(
|
|
39
|
+
"mt-8 -mb-12 ml-7 aspect-video -rotate-3 overflow-hidden rounded-md border object-cover object-top",
|
|
40
|
+
"transition-transform duration-300 group-hover:-rotate-1 group-hover:scale-105"
|
|
41
|
+
)}
|
|
42
|
+
height={336}
|
|
43
|
+
src={item.image}
|
|
44
|
+
width={640}
|
|
45
|
+
/>
|
|
46
|
+
</a>
|
|
47
|
+
))}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface TextGridSectionProps {
|
|
2
|
+
data: {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const TextGridSection = ({ data }: TextGridSectionProps) => (
|
|
10
|
+
<div className="grid gap-8 px-4 py-8 sm:px-12 sm:py-12 md:grid-cols-3">
|
|
11
|
+
{data.map((item) => (
|
|
12
|
+
<div key={item.id}>
|
|
13
|
+
<h3 className="mb-2 font-semibold text-lg tracking-tight">
|
|
14
|
+
{item.title}
|
|
15
|
+
</h3>
|
|
16
|
+
<p className="text-muted-foreground">{item.description}</p>
|
|
17
|
+
</div>
|
|
18
|
+
))}
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HomeLayout } from "@/components/geistdocs/home-layout";
|
|
2
|
+
import { source } from "@/lib/geistdocs/source";
|
|
3
|
+
|
|
4
|
+
const Layout = async ({ children, params }: LayoutProps<"/[lang]">) => {
|
|
5
|
+
const { lang } = await params;
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<HomeLayout tree={source.pageTree[lang]}>
|
|
9
|
+
<div className="pt-0 pb-32">{children}</div>
|
|
10
|
+
</HomeLayout>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default Layout;
|