@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
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Syntax
|
|
3
|
+
description: Learn about the supported markdown syntax and formatting options
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Supported MDX syntax including text formatting, code blocks, line highlighting, and Mermaid diagrams.
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
related:
|
|
9
|
+
- /docs/configuration
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Geistdocs supports MDX, a superset of Markdown that allows you to use JSX components within your documentation. This guide covers all the formatting options available.
|
|
13
|
+
|
|
14
|
+
## Frontmatter
|
|
15
|
+
|
|
16
|
+
Every MDX file should include frontmatter at the top:
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
---
|
|
20
|
+
title: Page Title
|
|
21
|
+
description: A brief description of the page content
|
|
22
|
+
---
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The `title` property is required and is used for the page heading and navigation. The `description` is used for SEO and page previews.
|
|
26
|
+
|
|
27
|
+
## Basic Markdown
|
|
28
|
+
|
|
29
|
+
### Text Formatting
|
|
30
|
+
|
|
31
|
+
You can style text using standard Markdown syntax:
|
|
32
|
+
|
|
33
|
+
- **Bold text** with `**double asterisks**`
|
|
34
|
+
- _Italic text_ with `*single asterisks*`
|
|
35
|
+
- ~~Strikethrough~~ with `~~double tildes~~`
|
|
36
|
+
- `Inline code` with `` `backticks` ``
|
|
37
|
+
|
|
38
|
+
### Headings
|
|
39
|
+
|
|
40
|
+
Use `#` symbols to create headings:
|
|
41
|
+
|
|
42
|
+
```md
|
|
43
|
+
# Heading 1
|
|
44
|
+
|
|
45
|
+
## Heading 2
|
|
46
|
+
|
|
47
|
+
### Heading 3
|
|
48
|
+
|
|
49
|
+
#### Heading 4
|
|
50
|
+
|
|
51
|
+
##### Heading 5
|
|
52
|
+
|
|
53
|
+
###### Heading 6
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Headings automatically generate anchor links for easy navigation and deep linking.
|
|
57
|
+
|
|
58
|
+
### Lists
|
|
59
|
+
|
|
60
|
+
Create unordered lists with `-`, `*`, or `+`:
|
|
61
|
+
|
|
62
|
+
- First item
|
|
63
|
+
- Second item
|
|
64
|
+
- Nested item
|
|
65
|
+
- Another nested item
|
|
66
|
+
- Third item
|
|
67
|
+
|
|
68
|
+
Create ordered lists with numbers:
|
|
69
|
+
|
|
70
|
+
1. First step
|
|
71
|
+
2. Second step
|
|
72
|
+
3. Third step
|
|
73
|
+
|
|
74
|
+
### Blockquotes
|
|
75
|
+
|
|
76
|
+
Use `>` to create blockquotes:
|
|
77
|
+
|
|
78
|
+
> This is a blockquote. You can use it to highlight important information or quotes from external sources.
|
|
79
|
+
|
|
80
|
+
### Links
|
|
81
|
+
|
|
82
|
+
Create links with `[text](url)`:
|
|
83
|
+
|
|
84
|
+
- [External link](https://vercel.com)
|
|
85
|
+
- [Internal link](/docs/getting-started)
|
|
86
|
+
|
|
87
|
+
### Images
|
|
88
|
+
|
|
89
|
+
Add images with ``:
|
|
90
|
+
|
|
91
|
+
```md
|
|
92
|
+

|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## GitHub Flavored Markdown
|
|
96
|
+
|
|
97
|
+
Geistdocs supports GFM extensions including tables, task lists, and autolinks.
|
|
98
|
+
|
|
99
|
+
### Tables
|
|
100
|
+
|
|
101
|
+
Create tables using pipes and dashes:
|
|
102
|
+
|
|
103
|
+
```md
|
|
104
|
+
| Feature | Description | Status |
|
|
105
|
+
| -------- | ----------------- | --------- |
|
|
106
|
+
| Markdown | Basic formatting | Supported |
|
|
107
|
+
| GFM | GitHub extensions | Supported |
|
|
108
|
+
| MDX | JSX in Markdown | Supported |
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
This renders as:
|
|
112
|
+
|
|
113
|
+
| Feature | Description | Status |
|
|
114
|
+
| -------- | ----------------- | --------- |
|
|
115
|
+
| Markdown | Basic formatting | Supported |
|
|
116
|
+
| GFM | GitHub extensions | Supported |
|
|
117
|
+
| MDX | JSX in Markdown | Supported |
|
|
118
|
+
|
|
119
|
+
### Task Lists
|
|
120
|
+
|
|
121
|
+
Create interactive task lists:
|
|
122
|
+
|
|
123
|
+
```md
|
|
124
|
+
- [x] Completed task
|
|
125
|
+
- [ ] Incomplete task
|
|
126
|
+
- [ ] Another task to do
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
This renders as:
|
|
130
|
+
|
|
131
|
+
- [x] Completed task
|
|
132
|
+
- [ ] Incomplete task
|
|
133
|
+
- [ ] Another task to do
|
|
134
|
+
|
|
135
|
+
### Autolinks
|
|
136
|
+
|
|
137
|
+
URLs are automatically converted to clickable links:
|
|
138
|
+
|
|
139
|
+
```md
|
|
140
|
+
https://vercel.com
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
This renders as:
|
|
144
|
+
|
|
145
|
+
https://vercel.com
|
|
146
|
+
|
|
147
|
+
## Code Blocks
|
|
148
|
+
|
|
149
|
+
Fenced code blocks support syntax highlighting for many languages.
|
|
150
|
+
|
|
151
|
+
### Basic Syntax Highlighting
|
|
152
|
+
|
|
153
|
+
Specify the language after the opening backticks:
|
|
154
|
+
|
|
155
|
+
````md
|
|
156
|
+
```typescript
|
|
157
|
+
const greet = (name: string): string => {
|
|
158
|
+
return `Hello, ${name}!`;
|
|
159
|
+
};
|
|
160
|
+
```
|
|
161
|
+
````
|
|
162
|
+
|
|
163
|
+
This renders as:
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
const greet = (name: string): string => {
|
|
167
|
+
return `Hello, ${name}!`;
|
|
168
|
+
};
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Titles
|
|
172
|
+
|
|
173
|
+
Add a title to your code block with the `title` attribute:
|
|
174
|
+
|
|
175
|
+
````md
|
|
176
|
+
```tsx title="components/button.tsx"
|
|
177
|
+
export const Button = ({ children }) => {
|
|
178
|
+
return <button type="button">{children}</button>;
|
|
179
|
+
};
|
|
180
|
+
```
|
|
181
|
+
````
|
|
182
|
+
|
|
183
|
+
This renders as:
|
|
184
|
+
|
|
185
|
+
```tsx title="components/button.tsx"
|
|
186
|
+
export const Button = ({ children }) => {
|
|
187
|
+
return <button type="button">{children}</button>;
|
|
188
|
+
};
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Line Numbers
|
|
192
|
+
|
|
193
|
+
Display line numbers by adding the `lineNumbers` attribute:
|
|
194
|
+
|
|
195
|
+
````md
|
|
196
|
+
```typescript lineNumbers
|
|
197
|
+
const numbers = [1, 2, 3, 4, 5];
|
|
198
|
+
const doubled = numbers.map((n) => n * 2);
|
|
199
|
+
console.log(doubled);
|
|
200
|
+
```
|
|
201
|
+
````
|
|
202
|
+
|
|
203
|
+
This renders as:
|
|
204
|
+
|
|
205
|
+
```typescript lineNumbers
|
|
206
|
+
const numbers = [1, 2, 3, 4, 5];
|
|
207
|
+
const doubled = numbers.map((n) => n * 2);
|
|
208
|
+
console.log(doubled);
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Line Highlighting
|
|
212
|
+
|
|
213
|
+
Highlight specific lines using the `[!code highlight]` comment:
|
|
214
|
+
|
|
215
|
+
````md
|
|
216
|
+
```typescript
|
|
217
|
+
const config = {
|
|
218
|
+
theme: "dark", // [ !code highlight]
|
|
219
|
+
language: "en",
|
|
220
|
+
};
|
|
221
|
+
```
|
|
222
|
+
````
|
|
223
|
+
|
|
224
|
+
Remove the space before `!` when using this syntax. This renders as:
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
const config = {
|
|
228
|
+
theme: "dark", // [!code highlight]
|
|
229
|
+
language: "en",
|
|
230
|
+
};
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Word Highlighting
|
|
234
|
+
|
|
235
|
+
Highlight specific words with `[!code word:term]`:
|
|
236
|
+
|
|
237
|
+
````md
|
|
238
|
+
```typescript
|
|
239
|
+
// [ !code word:config]
|
|
240
|
+
const config = {
|
|
241
|
+
theme: "dark",
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
console.log(config);
|
|
245
|
+
```
|
|
246
|
+
````
|
|
247
|
+
|
|
248
|
+
Remove the space before `!` when using this syntax. This renders as:
|
|
249
|
+
|
|
250
|
+
```typescript
|
|
251
|
+
// [!code word:config]
|
|
252
|
+
const config = {
|
|
253
|
+
theme: "dark",
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
console.log(config);
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Diff Syntax
|
|
260
|
+
|
|
261
|
+
Show additions and deletions with `[!code ++]` and `[!code --]`:
|
|
262
|
+
|
|
263
|
+
````md
|
|
264
|
+
```typescript
|
|
265
|
+
const config = {
|
|
266
|
+
theme: "light", // [ !code --]
|
|
267
|
+
theme: "dark", // [ !code ++]
|
|
268
|
+
language: "en",
|
|
269
|
+
};
|
|
270
|
+
```
|
|
271
|
+
````
|
|
272
|
+
|
|
273
|
+
Remove the space before `!` when using this syntax. This renders as:
|
|
274
|
+
|
|
275
|
+
```typescript
|
|
276
|
+
const config = {
|
|
277
|
+
theme: "light", // [!code --]
|
|
278
|
+
theme: "dark", // [!code ++]
|
|
279
|
+
language: "en",
|
|
280
|
+
};
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Focus Lines
|
|
284
|
+
|
|
285
|
+
Draw attention to specific lines with `[!code focus]`:
|
|
286
|
+
|
|
287
|
+
````md
|
|
288
|
+
```typescript
|
|
289
|
+
const numbers = [1, 2, 3, 4, 5];
|
|
290
|
+
const sum = numbers.reduce((a, b) => a + b, 0); // [ !code focus]
|
|
291
|
+
console.log(sum);
|
|
292
|
+
```
|
|
293
|
+
````
|
|
294
|
+
|
|
295
|
+
Remove the space before `!` when using this syntax. This renders as:
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
const numbers = [1, 2, 3, 4, 5];
|
|
299
|
+
const sum = numbers.reduce((a, b) => a + b, 0); // [!code focus]
|
|
300
|
+
console.log(sum);
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Mermaid Diagrams
|
|
304
|
+
|
|
305
|
+
Create diagrams and flowcharts using Mermaid syntax.
|
|
306
|
+
|
|
307
|
+
### Flowcharts
|
|
308
|
+
|
|
309
|
+
````md
|
|
310
|
+
```mermaid
|
|
311
|
+
graph TD;
|
|
312
|
+
A[Start] --> B{Is it working?};
|
|
313
|
+
B -->|Yes| C[Great!];
|
|
314
|
+
B -->|No| D[Debug];
|
|
315
|
+
D --> B;
|
|
316
|
+
```
|
|
317
|
+
````
|
|
318
|
+
|
|
319
|
+
This renders as:
|
|
320
|
+
|
|
321
|
+
```mermaid
|
|
322
|
+
graph TD;
|
|
323
|
+
A[Start] --> B{Is it working?};
|
|
324
|
+
B -->|Yes| C[Great!];
|
|
325
|
+
B -->|No| D[Debug];
|
|
326
|
+
D --> B;
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Sequence Diagrams
|
|
330
|
+
|
|
331
|
+
````md
|
|
332
|
+
```mermaid
|
|
333
|
+
sequenceDiagram
|
|
334
|
+
participant User
|
|
335
|
+
participant API
|
|
336
|
+
participant Database
|
|
337
|
+
User->>API: Request data
|
|
338
|
+
API->>Database: Query
|
|
339
|
+
Database-->>API: Results
|
|
340
|
+
API-->>User: Response
|
|
341
|
+
```
|
|
342
|
+
````
|
|
343
|
+
|
|
344
|
+
This renders as:
|
|
345
|
+
|
|
346
|
+
```mermaid
|
|
347
|
+
sequenceDiagram
|
|
348
|
+
participant User
|
|
349
|
+
participant API
|
|
350
|
+
participant Database
|
|
351
|
+
User->>API: Request data
|
|
352
|
+
API->>Database: Query
|
|
353
|
+
Database-->>API: Results
|
|
354
|
+
API-->>User: Response
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Architecture Diagrams
|
|
358
|
+
|
|
359
|
+
````md
|
|
360
|
+
```mermaid
|
|
361
|
+
graph TD;
|
|
362
|
+
subgraph Frontend
|
|
363
|
+
A[Web App]
|
|
364
|
+
B[Mobile App]
|
|
365
|
+
end
|
|
366
|
+
subgraph Backend
|
|
367
|
+
C[API Gateway]
|
|
368
|
+
D[Auth Service]
|
|
369
|
+
E[Data Service]
|
|
370
|
+
end
|
|
371
|
+
subgraph Storage
|
|
372
|
+
F[(Database)]
|
|
373
|
+
G[(Cache)]
|
|
374
|
+
end
|
|
375
|
+
A --> C
|
|
376
|
+
B --> C
|
|
377
|
+
C --> D
|
|
378
|
+
C --> E
|
|
379
|
+
E --> F
|
|
380
|
+
E --> G
|
|
381
|
+
```
|
|
382
|
+
````
|
|
383
|
+
|
|
384
|
+
This renders as:
|
|
385
|
+
|
|
386
|
+
```mermaid
|
|
387
|
+
graph TD;
|
|
388
|
+
subgraph Frontend
|
|
389
|
+
A[Web App]
|
|
390
|
+
B[Mobile App]
|
|
391
|
+
end
|
|
392
|
+
subgraph Backend
|
|
393
|
+
C[API Gateway]
|
|
394
|
+
D[Auth Service]
|
|
395
|
+
E[Data Service]
|
|
396
|
+
end
|
|
397
|
+
subgraph Storage
|
|
398
|
+
F[(Database)]
|
|
399
|
+
G[(Cache)]
|
|
400
|
+
end
|
|
401
|
+
A --> C
|
|
402
|
+
B --> C
|
|
403
|
+
C --> D
|
|
404
|
+
C --> E
|
|
405
|
+
E --> F
|
|
406
|
+
E --> G
|
|
407
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Theme-Aware Image
|
|
3
|
+
description: Display different images based on the user's light or dark theme preference
|
|
4
|
+
type: reference
|
|
5
|
+
summary: A component that swaps images based on the active theme, built on top of Next.js Image.
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
- /docs/provider
|
|
9
|
+
related:
|
|
10
|
+
- /docs/syntax
|
|
11
|
+
- /docs/configuration
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
The `ThemeAwareImage` component renders different images depending on whether the user is viewing your documentation in light or dark mode. It extends the Next.js `Image` component, so you get all the same optimization benefits like lazy loading, responsive sizing, and format conversion.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
Import the component and pass a `src` object with `light` and `dark` variants:
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { ThemeAwareImage } from "@/components/geistdocs/theme-aware-image";
|
|
22
|
+
|
|
23
|
+
<ThemeAwareImage
|
|
24
|
+
src={{
|
|
25
|
+
light: "/images/diagram-light.png",
|
|
26
|
+
dark: "/images/diagram-dark.png",
|
|
27
|
+
}}
|
|
28
|
+
alt="Architecture diagram"
|
|
29
|
+
width={800}
|
|
30
|
+
height={400}
|
|
31
|
+
/>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The component reads the current theme from `next-themes` and resolves the correct image source automatically. All standard Next.js `Image` props (such as `width`, `height`, `alt`, `priority`, and `className`) are supported.
|
|
35
|
+
|
|
36
|
+
## How it works
|
|
37
|
+
|
|
38
|
+
`ThemeAwareImage` uses the `resolvedTheme` value from the `useTheme` hook provided by `next-themes`. This ensures it responds to the actual rendered theme, even when the user's preference is set to "system".
|
|
39
|
+
|
|
40
|
+
- When `resolvedTheme` is `"dark"`, the `src.dark` image is displayed.
|
|
41
|
+
- Otherwise, the `src.light` image is used.
|
|
42
|
+
|
|
43
|
+
Because this component relies on client-side theme detection, it is a client component (`"use client"`).
|
|
44
|
+
|
|
45
|
+
## Props
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Description |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| `src` | `{ light: ImageProps["src"]; dark: ImageProps["src"] }` | An object containing the light and dark image sources |
|
|
50
|
+
| `alt` | `string` | Accessible alt text for the image |
|
|
51
|
+
| `width` | `number` | The width of the image in pixels |
|
|
52
|
+
| `height` | `number` | The height of the image in pixels |
|
|
53
|
+
| `...rest` | `ImageProps` | Any additional props supported by the Next.js `Image` component |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export const Logo = () => (
|
|
2
|
+
<span className="font-semibold text-gray-1000 text-lg leading-none tracking-[-3%]">
|
|
3
|
+
Geistdocs
|
|
4
|
+
</span>
|
|
5
|
+
);
|
|
6
|
+
|
|
7
|
+
export const github = {
|
|
8
|
+
owner: "vercel",
|
|
9
|
+
repo: "geistdocs",
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const nav = [
|
|
13
|
+
{
|
|
14
|
+
label: "Docs",
|
|
15
|
+
href: "/docs",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: "Source",
|
|
19
|
+
href: `https://github.com/${github.owner}/${github.repo}/`,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
export const suggestions = [
|
|
24
|
+
"What is Geistdocs?",
|
|
25
|
+
"What can I make with Geistdocs?",
|
|
26
|
+
"What syntax does Geistdocs support?",
|
|
27
|
+
"How do I deploy my Geistdocs site?",
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
export const title = "Geistdocs Documentation";
|
|
31
|
+
|
|
32
|
+
export const prompt =
|
|
33
|
+
"You are a helpful assistant specializing in answering questions about Geistdocs, a modern documentation template built with Next.js and Fumadocs.";
|
|
34
|
+
|
|
35
|
+
export const translations = {
|
|
36
|
+
en: {
|
|
37
|
+
displayName: "English",
|
|
38
|
+
},
|
|
39
|
+
cn: {
|
|
40
|
+
displayName: "Chinese",
|
|
41
|
+
search: "搜尋文檔",
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const basePath: string | undefined = undefined;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Unique identifier for this site, used in markdown request tracking analytics.
|
|
49
|
+
* Each site using geistdocs should set this to a unique value (e.g. "ai-sdk-docs", "next-docs").
|
|
50
|
+
*/
|
|
51
|
+
export const siteId: string | undefined = undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { atom, useAtom } from "jotai";
|
|
2
|
+
|
|
3
|
+
// Export the sidebar open state atom so it can be used from other parts of the app
|
|
4
|
+
export const sidebarOpenAtom = atom<boolean>(false);
|
|
5
|
+
|
|
6
|
+
export const useSidebarContext = () => {
|
|
7
|
+
const [isOpen, setIsOpen] = useAtom(sidebarOpenAtom);
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
isOpen,
|
|
11
|
+
setIsOpen,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
const MOBILE_BREAKPOINT = 768
|
|
4
|
+
|
|
5
|
+
export function useIsMobile() {
|
|
6
|
+
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
|
|
7
|
+
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
|
|
10
|
+
const onChange = () => {
|
|
11
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
12
|
+
}
|
|
13
|
+
mql.addEventListener("change", onChange)
|
|
14
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
15
|
+
return () => mql.removeEventListener("change", onChange)
|
|
16
|
+
}, [])
|
|
17
|
+
|
|
18
|
+
return !!isMobile
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineConfig } from "@vercel/geistdocs/config";
|
|
2
|
+
import {
|
|
3
|
+
basePath,
|
|
4
|
+
github,
|
|
5
|
+
Logo,
|
|
6
|
+
nav,
|
|
7
|
+
prompt,
|
|
8
|
+
siteId,
|
|
9
|
+
suggestions,
|
|
10
|
+
title,
|
|
11
|
+
translations,
|
|
12
|
+
} from "@/geistdocs";
|
|
13
|
+
|
|
14
|
+
export const config = defineConfig({
|
|
15
|
+
title,
|
|
16
|
+
defaultLanguage: "en",
|
|
17
|
+
logo: <Logo />,
|
|
18
|
+
github,
|
|
19
|
+
nav,
|
|
20
|
+
basePath,
|
|
21
|
+
siteId,
|
|
22
|
+
translations,
|
|
23
|
+
ai: {
|
|
24
|
+
prompt,
|
|
25
|
+
suggestions,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Geist_Mono as createMono,
|
|
3
|
+
Geist as createSans,
|
|
4
|
+
} from "next/font/google";
|
|
5
|
+
|
|
6
|
+
export const sans = createSans({
|
|
7
|
+
variable: "--font-sans",
|
|
8
|
+
subsets: ["latin"],
|
|
9
|
+
weight: "variable",
|
|
10
|
+
display: "swap",
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export const mono = createMono({
|
|
14
|
+
variable: "--font-mono",
|
|
15
|
+
subsets: ["latin"],
|
|
16
|
+
weight: "variable",
|
|
17
|
+
display: "swap",
|
|
18
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineI18n } from "fumadocs-core/i18n";
|
|
2
|
+
import { defineI18nUI } from "fumadocs-ui/i18n";
|
|
3
|
+
import { translations } from "@/geistdocs";
|
|
4
|
+
|
|
5
|
+
export const i18n = defineI18n({
|
|
6
|
+
defaultLanguage: "en",
|
|
7
|
+
languages: Object.keys(translations),
|
|
8
|
+
hideLocale: "default-locale",
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const { provider: i18nProvider } = defineI18nUI(i18n, {
|
|
12
|
+
translations,
|
|
13
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { DetectionMethod } from "@vercel/agent-readability";
|
|
2
|
+
import { siteId } from "@/geistdocs";
|
|
3
|
+
|
|
4
|
+
const PLATFORM_URL = "https://geistdocs.com/md-tracking";
|
|
5
|
+
|
|
6
|
+
interface TrackMdRequestParams {
|
|
7
|
+
acceptHeader: string | null;
|
|
8
|
+
/** Detection method used to identify the agent (only for agent-rewrite requests) */
|
|
9
|
+
detectionMethod?: DetectionMethod | null;
|
|
10
|
+
path: string;
|
|
11
|
+
referer: string | null;
|
|
12
|
+
/** How the markdown was requested: 'md-url' for direct .md URLs, 'header-negotiated' for Accept header, 'agent-rewrite' for detected AI agents */
|
|
13
|
+
requestType?: "md-url" | "header-negotiated" | "agent-rewrite";
|
|
14
|
+
userAgent: string | null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Track a markdown page request via the geistdocs platform.
|
|
19
|
+
* Fire-and-forget: errors are logged but don't affect the response.
|
|
20
|
+
*/
|
|
21
|
+
export async function trackMdRequest({
|
|
22
|
+
path,
|
|
23
|
+
userAgent,
|
|
24
|
+
referer,
|
|
25
|
+
acceptHeader,
|
|
26
|
+
requestType,
|
|
27
|
+
detectionMethod,
|
|
28
|
+
}: TrackMdRequestParams): Promise<void> {
|
|
29
|
+
try {
|
|
30
|
+
const response = await fetch(PLATFORM_URL, {
|
|
31
|
+
method: "POST",
|
|
32
|
+
headers: {
|
|
33
|
+
"Content-Type": "application/json",
|
|
34
|
+
},
|
|
35
|
+
body: JSON.stringify({
|
|
36
|
+
path,
|
|
37
|
+
siteId: siteId ?? "geistdocs-unknown",
|
|
38
|
+
userAgent,
|
|
39
|
+
referer,
|
|
40
|
+
acceptHeader,
|
|
41
|
+
requestType,
|
|
42
|
+
detectionMethod,
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (!response.ok) {
|
|
47
|
+
console.error(
|
|
48
|
+
"MD tracking failed:",
|
|
49
|
+
response.status,
|
|
50
|
+
await response.text()
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
} catch (error) {
|
|
54
|
+
console.error("MD tracking error:", error);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createSource } from "@vercel/geistdocs/source";
|
|
2
|
+
import { docs } from "@/.source/server";
|
|
3
|
+
import { config } from "./config";
|
|
4
|
+
|
|
5
|
+
export const geistdocsSource = createSource({
|
|
6
|
+
docs,
|
|
7
|
+
config,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const source = geistdocsSource.source;
|
|
11
|
+
export const getPageImage = geistdocsSource.getPageImage;
|
|
12
|
+
export const getLLMText = geistdocsSource.getPageMarkdown;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createMDX } from "fumadocs-mdx/next";
|
|
2
|
+
import type { NextConfig } from "next";
|
|
3
|
+
|
|
4
|
+
const withMDX = createMDX();
|
|
5
|
+
|
|
6
|
+
const config: NextConfig = {
|
|
7
|
+
experimental: {
|
|
8
|
+
turbopackFileSystemCacheForDev: true,
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
images: {
|
|
12
|
+
formats: ["image/avif", "image/webp"],
|
|
13
|
+
remotePatterns: [
|
|
14
|
+
{
|
|
15
|
+
protocol: "https",
|
|
16
|
+
hostname: "placehold.co",
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default withMDX(config);
|