@vercel/geistdocs 1.2.2 → 1.2.3-canary.1d733b2
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/assets/icons/icon-arrow-up-right-small.d.ts +8 -0
- package/dist/assets/icons/icon-arrow-up-right-small.d.ts.map +1 -0
- package/dist/assets/icons/icon-arrow-up-right-small.js +4 -0
- package/dist/assets/icons/icon-arrow-up-right.d.ts +5 -0
- package/dist/assets/icons/icon-arrow-up-right.d.ts.map +1 -0
- package/dist/assets/icons/icon-arrow-up-right.js +4 -0
- package/dist/assets/icons/icon-check.d.ts +5 -0
- package/dist/assets/icons/icon-check.d.ts.map +1 -0
- package/dist/assets/icons/icon-check.js +4 -0
- package/dist/assets/icons/icon-chevron-down-small.d.ts +8 -0
- package/dist/assets/icons/icon-chevron-down-small.d.ts.map +1 -0
- package/dist/assets/icons/icon-chevron-down-small.js +7 -0
- package/dist/assets/icons/icon-chevron-right.d.ts +5 -0
- package/dist/assets/icons/icon-chevron-right.d.ts.map +1 -0
- package/dist/assets/icons/icon-chevron-right.js +4 -0
- package/dist/assets/icons/icon-copy.d.ts +5 -0
- package/dist/assets/icons/icon-copy.d.ts.map +1 -0
- package/dist/assets/icons/icon-copy.js +4 -0
- package/dist/assets/icons/icon-file-text.d.ts +5 -0
- package/dist/assets/icons/icon-file-text.d.ts.map +1 -0
- package/dist/assets/icons/icon-file-text.js +4 -0
- package/dist/assets/icons/icon-menu-alt.d.ts +5 -0
- package/dist/assets/icons/icon-menu-alt.d.ts.map +1 -0
- package/dist/assets/icons/icon-menu-alt.js +4 -0
- package/dist/assets/icons/icon-slash-forward.d.ts +8 -0
- package/dist/assets/icons/icon-slash-forward.d.ts.map +1 -0
- package/dist/assets/icons/icon-slash-forward.js +4 -0
- package/dist/assets/icons/index.d.ts +10 -0
- package/dist/assets/icons/index.d.ts.map +1 -0
- package/dist/assets/icons/index.js +10 -0
- package/dist/assets/logos/index.d.ts +15 -0
- package/dist/assets/logos/index.d.ts.map +1 -0
- package/dist/assets/logos/index.js +15 -0
- package/dist/assets/logos/logo-ai-elements.d.ts +8 -0
- package/dist/assets/logos/logo-ai-elements.d.ts.map +1 -0
- package/dist/assets/logos/logo-ai-elements.js +8 -0
- package/dist/assets/logos/logo-ai-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-ai-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-ai-sdk.js +8 -0
- package/dist/assets/logos/logo-chat-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-chat-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-chat-sdk.js +8 -0
- package/dist/assets/logos/logo-flags-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-flags-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-flags-sdk.js +8 -0
- package/dist/assets/logos/logo-icon-vercel.d.ts +9 -0
- package/dist/assets/logos/logo-icon-vercel.d.ts.map +1 -0
- package/dist/assets/logos/logo-icon-vercel.js +8 -0
- package/dist/assets/logos/logo-nextjs.d.ts +8 -0
- package/dist/assets/logos/logo-nextjs.d.ts.map +1 -0
- package/dist/assets/logos/logo-nextjs.js +7 -0
- package/dist/assets/logos/logo-streamdown.d.ts +8 -0
- package/dist/assets/logos/logo-streamdown.d.ts.map +1 -0
- package/dist/assets/logos/logo-streamdown.js +8 -0
- package/dist/assets/logos/logo-svelte-kit.d.ts +8 -0
- package/dist/assets/logos/logo-svelte-kit.d.ts.map +1 -0
- package/dist/assets/logos/logo-svelte-kit.js +7 -0
- package/dist/assets/logos/logo-vercel-oss.d.ts +8 -0
- package/dist/assets/logos/logo-vercel-oss.d.ts.map +1 -0
- package/dist/assets/logos/logo-vercel-oss.js +7 -0
- package/dist/assets/logos/logo-workflow-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-workflow-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-workflow-sdk.js +8 -0
- 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 +45 -0
- package/dist/components/copy-prompt.d.ts +11 -0
- package/dist/components/copy-prompt.d.ts.map +1 -0
- package/dist/components/copy-prompt.js +58 -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 +117 -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/footer.d.ts +8 -0
- package/dist/footer.d.ts.map +1 -0
- package/dist/footer.js +6 -0
- package/dist/home-layout.d.ts +11 -0
- package/dist/home-layout.d.ts.map +1 -0
- package/dist/home-layout.js +31 -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/config-context.d.ts +10 -0
- package/dist/internal/config-context.d.ts.map +1 -0
- package/dist/internal/config-context.js +15 -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/footer/github-button.d.ts +7 -0
- package/dist/internal/footer/github-button.d.ts.map +1 -0
- package/dist/internal/footer/github-button.js +10 -0
- package/dist/internal/footer/rss-button.d.ts +2 -0
- package/dist/internal/footer/rss-button.d.ts.map +1 -0
- package/dist/internal/footer/rss-button.js +4 -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/localized-link.d.ts +8 -0
- package/dist/internal/localized-link.d.ts.map +1 -0
- package/dist/internal/localized-link.js +13 -0
- package/dist/internal/navbar/desktop-menu.d.ts +10 -0
- package/dist/internal/navbar/desktop-menu.d.ts.map +1 -0
- package/dist/internal/navbar/desktop-menu.js +11 -0
- package/dist/internal/navbar/mobile-menu.d.ts +7 -0
- package/dist/internal/navbar/mobile-menu.d.ts.map +1 -0
- package/dist/internal/navbar/mobile-menu.js +44 -0
- package/dist/internal/navbar/navbar-logo.d.ts +16 -0
- package/dist/internal/navbar/navbar-logo.d.ts.map +1 -0
- package/dist/internal/navbar/navbar-logo.js +30 -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 +13 -0
- package/dist/internal/page-actions-client.d.ts.map +1 -0
- package/dist/internal/page-actions-client.js +171 -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/page-visibility.d.ts +18 -0
- package/dist/internal/page-visibility.d.ts.map +1 -0
- package/dist/internal/page-visibility.js +24 -0
- package/dist/internal/provider-client.d.ts +9 -0
- package/dist/internal/provider-client.d.ts.map +1 -0
- package/dist/internal/provider-client.js +24 -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 +9 -0
- package/dist/internal/sidebar.d.ts.map +1 -0
- package/dist/internal/sidebar.js +38 -0
- package/dist/internal/table-of-contents.d.ts +9 -0
- package/dist/internal/table-of-contents.d.ts.map +1 -0
- package/dist/internal/table-of-contents.js +5 -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/navigation-menu.d.ts +17 -0
- package/dist/internal/ui/navigation-menu.d.ts.map +1 -0
- package/dist/internal/ui/navigation-menu.js +38 -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 +14 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +31 -0
- package/dist/mdx.d.ts +67 -0
- package/dist/mdx.d.ts.map +1 -0
- package/dist/mdx.js +35 -0
- package/dist/mobile-docs-bar.d.ts +7 -0
- package/dist/mobile-docs-bar.d.ts.map +1 -0
- package/dist/mobile-docs-bar.js +13 -0
- package/dist/navbar.d.ts +7 -0
- package/dist/navbar.d.ts.map +1 -0
- package/dist/navbar.js +10 -0
- package/dist/pages/docs.d.ts +83 -0
- package/dist/pages/docs.d.ts.map +1 -0
- package/dist/pages/docs.js +98 -0
- package/dist/proxy.d.ts +37 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +189 -0
- package/dist/routes/agents.d.ts +21 -0
- package/dist/routes/agents.d.ts.map +1 -0
- package/dist/routes/agents.js +201 -0
- package/dist/routes/chat.d.ts +14 -0
- package/dist/routes/chat.d.ts.map +1 -0
- package/dist/routes/chat.js +251 -0
- package/dist/routes/llms.d.ts +52 -0
- package/dist/routes/llms.d.ts.map +1 -0
- package/dist/routes/llms.js +110 -0
- package/dist/routes/search.d.ts +13 -0
- package/dist/routes/search.d.ts.map +1 -0
- package/dist/routes/search.js +81 -0
- package/dist/routes/sitemap.d.ts +47 -0
- package/dist/routes/sitemap.d.ts.map +1 -0
- package/dist/routes/sitemap.js +176 -0
- package/dist/shiki-theme.d.ts +20 -0
- package/dist/shiki-theme.d.ts.map +1 -0
- package/dist/shiki-theme.js +110 -0
- package/dist/sidebar.d.ts +11 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +16 -0
- package/dist/source-config.d.ts +68 -0
- package/dist/source-config.d.ts.map +1 -0
- package/dist/source-config.js +161 -0
- package/dist/source.d.ts +181 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +142 -0
- package/dist/versions.d.ts +45 -0
- package/dist/versions.d.ts.map +1 -0
- package/dist/versions.js +79 -0
- package/package.json +186 -9
- package/source-config.js +174 -0
- package/styles.css +556 -0
- package/template/AGENTS.md +82 -0
- package/template/_gitignore +29 -0
- package/template/app/[lang]/(home)/components/centered-section.tsx +24 -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 +23 -0
- package/template/app/[lang]/(home)/components/templates.tsx +48 -0
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
- package/template/app/[lang]/(home)/layout.tsx +15 -0
- package/template/app/[lang]/(home)/page.tsx +126 -0
- package/template/app/[lang]/agents.md/route.ts +6 -0
- package/template/app/[lang]/docs/[[...slug]]/page.tsx +22 -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/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 +595 -0
- package/template/components/geistdocs/docs-layout.tsx +20 -0
- package/template/components/geistdocs/mdx-components.tsx +5 -0
- package/template/components/geistdocs/provider.tsx +31 -0
- package/template/components/ui/badge.tsx +46 -0
- package/template/components/ui/button.tsx +60 -0
- package/template/components/ui/command-prompt.tsx +488 -0
- package/template/components.json +22 -0
- package/template/content/docs/agent-readiness.mdx +103 -0
- package/template/content/docs/ask-ai.cn.mdx +85 -0
- package/template/content/docs/ask-ai.mdx +89 -0
- package/template/content/docs/configuration.cn.mdx +155 -0
- package/template/content/docs/configuration.mdx +275 -0
- package/template/content/docs/deployment.cn.mdx +34 -0
- package/template/content/docs/deployment.mdx +40 -0
- package/template/content/docs/edit-on-github.cn.mdx +47 -0
- package/template/content/docs/edit-on-github.mdx +51 -0
- package/template/content/docs/env.cn.mdx +25 -0
- package/template/content/docs/env.mdx +29 -0
- package/template/content/docs/feedback.cn.mdx +85 -0
- package/template/content/docs/feedback.mdx +89 -0
- package/template/content/docs/getting-started.cn.mdx +86 -0
- package/template/content/docs/getting-started.mdx +108 -0
- package/template/content/docs/index.cn.mdx +57 -0
- package/template/content/docs/index.mdx +95 -0
- package/template/content/docs/internationalization.cn.mdx +111 -0
- package/template/content/docs/internationalization.mdx +122 -0
- package/template/content/docs/llms-txt.cn.mdx +72 -0
- package/template/content/docs/llms-txt.mdx +86 -0
- package/template/content/docs/md.cn.mdx +65 -0
- package/template/content/docs/md.mdx +82 -0
- package/template/content/docs/meta.json +25 -0
- package/template/content/docs/migration.mdx +321 -0
- package/template/content/docs/open-in-chat.cn.mdx +78 -0
- package/template/content/docs/open-in-chat.mdx +80 -0
- package/template/content/docs/provider.cn.mdx +70 -0
- package/template/content/docs/provider.mdx +74 -0
- package/template/content/docs/proxy.cn.mdx +96 -0
- package/template/content/docs/proxy.mdx +178 -0
- package/template/content/docs/rss.cn.mdx +104 -0
- package/template/content/docs/rss.mdx +108 -0
- package/template/content/docs/syntax.cn.mdx +416 -0
- package/template/content/docs/syntax.mdx +411 -0
- package/template/content/docs/theme-aware-image.mdx +57 -0
- package/template/content/docs/versioned-docs.cn.mdx +117 -0
- package/template/content/docs/versioned-docs.mdx +228 -0
- package/template/geistdocs.tsx +77 -0
- package/template/lib/geistdocs/config.tsx +30 -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 +17 -0
- package/template/source.config.ts +23 -0
- package/template/tsconfig.json +37 -0
- package/dist/index.js +0 -2
- /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
|
@@ -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-gray-800" />
|
|
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-gray-800 leading-relaxed sm:text-xl">
|
|
22
|
+
{description}
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
{children}
|
|
26
|
+
</section>
|
|
27
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
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-gray-800 text-lg">{description}</p>
|
|
20
|
+
</div>
|
|
21
|
+
<div className="sm:col-span-2 sm:p-12">{children}</div>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
@@ -0,0 +1,48 @@
|
|
|
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-gray-800 text-lg">{description}</p>
|
|
22
|
+
</div>
|
|
23
|
+
<div className="grid gap-8 md:grid-cols-3">
|
|
24
|
+
{data.map((item) => (
|
|
25
|
+
<a
|
|
26
|
+
className="group flex-col overflow-hidden rounded-lg border bg-background-100 p-4"
|
|
27
|
+
href={item.link}
|
|
28
|
+
key={item.title}
|
|
29
|
+
>
|
|
30
|
+
<h3 className="font-medium tracking-tight">{item.title}</h3>
|
|
31
|
+
<p className="line-clamp-2 text-gray-800 text-sm">
|
|
32
|
+
{item.description}
|
|
33
|
+
</p>
|
|
34
|
+
<Image
|
|
35
|
+
alt={item.title}
|
|
36
|
+
className={cn(
|
|
37
|
+
"mt-8 -mb-12 ml-7 aspect-video -rotate-3 overflow-hidden rounded-md border object-cover object-top",
|
|
38
|
+
"transition-transform duration-300 group-hover:-rotate-1 group-hover:scale-105"
|
|
39
|
+
)}
|
|
40
|
+
height={336}
|
|
41
|
+
src={item.image}
|
|
42
|
+
width={640}
|
|
43
|
+
/>
|
|
44
|
+
</a>
|
|
45
|
+
))}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
@@ -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-gray-800">{item.description}</p>
|
|
17
|
+
</div>
|
|
18
|
+
))}
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GeistdocsHomeLayout } from "@vercel/geistdocs/home-layout";
|
|
2
|
+
import { config } from "@/lib/geistdocs/config";
|
|
3
|
+
import { source } from "@/lib/geistdocs/source";
|
|
4
|
+
|
|
5
|
+
const Layout = async ({ children, params }: LayoutProps<"/[lang]">) => {
|
|
6
|
+
const { lang } = await params;
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<GeistdocsHomeLayout config={config} tree={source.pageTree[lang]}>
|
|
10
|
+
<div className="pt-0 pb-32">{children}</div>
|
|
11
|
+
</GeistdocsHomeLayout>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default Layout;
|
|
@@ -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-100" />
|
|
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-100" />
|
|
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,22 @@
|
|
|
1
|
+
import { MobileDocsBar } from "@vercel/geistdocs/mobile-docs-bar";
|
|
2
|
+
import { createDocsPage } from "@vercel/geistdocs/pages/docs";
|
|
3
|
+
import { getMDXComponents } from "@/components/geistdocs/mdx-components";
|
|
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
|
+
openGraph: {
|
|
11
|
+
images: true,
|
|
12
|
+
},
|
|
13
|
+
source: geistdocsSource,
|
|
14
|
+
tableOfContentPopover: {
|
|
15
|
+
enabled: false,
|
|
16
|
+
},
|
|
17
|
+
renderTop: ({ data }) => <MobileDocsBar toc={data.toc} />,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export default docsPage.Page;
|
|
21
|
+
export const generateStaticParams = docsPage.generateStaticParams;
|
|
22
|
+
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 "@vercel/geistdocs/footer";
|
|
3
|
+
import { Navbar } from "@vercel/geistdocs/navbar";
|
|
4
|
+
import { GeistdocsProvider } from "@/components/geistdocs/provider";
|
|
5
|
+
import { config } from "@/lib/geistdocs/config";
|
|
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={config.basePath} lang={lang}>
|
|
20
|
+
<Navbar config={config} />
|
|
21
|
+
{children}
|
|
22
|
+
<Footer config={config} />
|
|
23
|
+
</GeistdocsProvider>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default Layout;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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 { geistdocsSource } from "@/lib/geistdocs/source";
|
|
4
|
+
|
|
5
|
+
export const { GET, generateStaticParams, revalidate, dynamic } =
|
|
6
|
+
createSitemapMarkdownRoute({
|
|
7
|
+
config,
|
|
8
|
+
sources: [{ source: geistdocsSource }],
|
|
9
|
+
});
|
|
@@ -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
|
+
sources: [geistdocsSource],
|
|
8
|
+
});
|
|
Binary file
|
|
@@ -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
|
+
}
|