@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,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: .md 扩展
|
|
3
|
+
description: 通过在任何 URL 后追加 .md 或 .mdx 来以原始 Markdown 访问文档页面
|
|
4
|
+
type: conceptual
|
|
5
|
+
summary: 通过在 URL 后追加 .md 或 .mdx 以原始 Markdown 格式访问任何文档页面,供 AI 工具使用。
|
|
6
|
+
related:
|
|
7
|
+
- /docs/llms-txt
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Geistdocs 包含一个内置功能,允许 AI 工具和语言模型以纯 Markdown 的形式访问你的文档。只需在任何文档页面的 URL 后追加 `.mdx`,即可获取处理后的 Markdown 内容。
|
|
11
|
+
|
|
12
|
+
## 工作原理
|
|
13
|
+
|
|
14
|
+
当你在任何文档 URL 后添加 `.md` 或 `.mdx` 时,你将得到页面内容的纯文本 Markdown,而不是呈现的 HTML。这样可以方便 AI 工具读取并理解你的文档。
|
|
15
|
+
|
|
16
|
+
### 示例
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
# Normal page
|
|
20
|
+
https://yourdomain.com/docs/getting-started
|
|
21
|
+
|
|
22
|
+
# Markdown version
|
|
23
|
+
https://yourdomain.com/docs/getting-started.mdx
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`.mdx` 版本返回:
|
|
27
|
+
|
|
28
|
+
- 页面标题作为 H1 级标题
|
|
29
|
+
- 完整的处理后 Markdown 内容
|
|
30
|
+
- 无 HTML、样式或导航
|
|
31
|
+
|
|
32
|
+
## 使用场景
|
|
33
|
+
|
|
34
|
+
此功能特别适用于:
|
|
35
|
+
|
|
36
|
+
- **AI 聊天工具** - 像 ChatGPT、Claude 和 Cursor 这样的工具可以获取并读取你的文档
|
|
37
|
+
- **LLM 上下文** - 为语言模型提示提供干净的文本
|
|
38
|
+
- **文档分析** - 提取内容以便处理或分析
|
|
39
|
+
- **内容迁移** - 以干净的格式导出文档
|
|
40
|
+
|
|
41
|
+
## 实现
|
|
42
|
+
|
|
43
|
+
该功能使用 Next.js 的重写规则,将 `.mdx` 请求路由到一个特殊端点:
|
|
44
|
+
|
|
45
|
+
**next.config.ts**
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
async rewrites() {
|
|
49
|
+
return [
|
|
50
|
+
{
|
|
51
|
+
source: "/docs/:path*.mdx",
|
|
52
|
+
destination: "/llms.mdx/:path*",
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
该端点会处理页面并以 `text/markdown` 内容类型返回纯 Markdown。
|
|
59
|
+
|
|
60
|
+
## 响应格式
|
|
61
|
+
|
|
62
|
+
响应包含:
|
|
63
|
+
|
|
64
|
+
- Content-Type: `text/markdown`
|
|
65
|
+
- 页面标题作为一级标题
|
|
66
|
+
- 来自 Fumadocs 的处理后 Markdown 内容
|
|
67
|
+
|
|
68
|
+
所有 MDX 组件都会被处理并转换为等效的纯 Markdown。
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: .md Extension
|
|
3
|
+
description: Access documentation pages as raw Markdown by appending .md or .mdx to any URL
|
|
4
|
+
type: conceptual
|
|
5
|
+
summary: Access any documentation page as raw Markdown by appending .md or .mdx to the URL for AI tool consumption.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/llms-txt
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Geistdocs includes a built-in feature that allows AI tools and language models to access your documentation as plain Markdown. Simply append `.mdx` to any documentation page URL to get the processed Markdown content.
|
|
11
|
+
|
|
12
|
+
## How It Works
|
|
13
|
+
|
|
14
|
+
When you add `.md` or `.mdx` to any documentation URL, you get back the page content as plain text Markdown instead of the rendered HTML. This makes it easy for AI tools to read and understand your documentation.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
# Normal page
|
|
20
|
+
https://yourdomain.com/docs/getting-started
|
|
21
|
+
|
|
22
|
+
# Markdown version
|
|
23
|
+
https://yourdomain.com/docs/getting-started.mdx
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The `.mdx` version returns:
|
|
27
|
+
|
|
28
|
+
- The page title as an H1 heading
|
|
29
|
+
- The full processed Markdown content
|
|
30
|
+
- No HTML, styling, or navigation
|
|
31
|
+
|
|
32
|
+
## Use Cases
|
|
33
|
+
|
|
34
|
+
This feature is particularly useful for:
|
|
35
|
+
|
|
36
|
+
- **AI Chat Tools** - Tools like ChatGPT, Claude, and Cursor can fetch and read your docs
|
|
37
|
+
- **LLM Context** - Provides clean text for language model prompts
|
|
38
|
+
- **Documentation Analysis** - Extract content for processing or analysis
|
|
39
|
+
- **Content Migration** - Export documentation in a clean format
|
|
40
|
+
|
|
41
|
+
## Implementation
|
|
42
|
+
|
|
43
|
+
The feature uses a Next.js rewrite rule to route `.mdx` requests to a special endpoint:
|
|
44
|
+
|
|
45
|
+
**next.config.ts**
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
async rewrites() {
|
|
49
|
+
return [
|
|
50
|
+
{
|
|
51
|
+
source: "/docs/:path*.mdx",
|
|
52
|
+
destination: "/llms.mdx/:path*",
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The endpoint processes the page and returns plain Markdown with a `text/markdown` content type.
|
|
59
|
+
|
|
60
|
+
## Response Format
|
|
61
|
+
|
|
62
|
+
The response includes:
|
|
63
|
+
|
|
64
|
+
- Content-Type: `text/markdown`
|
|
65
|
+
- The page title as a level 1 heading
|
|
66
|
+
- Processed Markdown content from Fumadocs
|
|
67
|
+
|
|
68
|
+
All MDX components are processed and converted to plain Markdown equivalents.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Vercel Documentation",
|
|
3
|
+
"description": "Vercel Documentation",
|
|
4
|
+
"root": true,
|
|
5
|
+
"pages": [
|
|
6
|
+
"index",
|
|
7
|
+
"getting-started",
|
|
8
|
+
"env",
|
|
9
|
+
"deployment",
|
|
10
|
+
"configuration",
|
|
11
|
+
"---Internals---",
|
|
12
|
+
"syntax",
|
|
13
|
+
"provider",
|
|
14
|
+
"---Features---",
|
|
15
|
+
"...",
|
|
16
|
+
"---AI---",
|
|
17
|
+
"open-in-chat",
|
|
18
|
+
"llms-txt",
|
|
19
|
+
"ask-ai"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 在聊天中打开
|
|
3
|
+
description: 允许用户通过一次点击在其偏好的 AI 聊天平台中继续对话
|
|
4
|
+
type: conceptual
|
|
5
|
+
summary: 一键将文档上下文传输到 ChatGPT、Claude、Cursor 和 v0 等 AI 聊天平台。
|
|
6
|
+
related:
|
|
7
|
+
- /docs/ask-ai
|
|
8
|
+
- /docs/env
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
"The "Open in Chat" feature enables users to seamlessly transfer documentation context to their preferred AI assistant. With a single click, users can open the current page in external AI chat platforms like ChatGPT, Claude, v0, Cursor, and more."
|
|
12
|
+
|
|
13
|
+
## 如何工作
|
|
14
|
+
|
|
15
|
+
在每个文档页面的目录侧边栏中,用户会看到一个 **在聊天中打开** 按钮。点击后,会出现一个菜单,列出可将页面在各类 AI 平台中打开的选项:
|
|
16
|
+
|
|
17
|
+
1. 用户点击 **在聊天中打开**
|
|
18
|
+
2. 下拉菜单显示可用平台
|
|
19
|
+
3. 用户选择其偏好的 AI 助手
|
|
20
|
+
4. 平台以预填充的提示打开,提示包含页面 URL 和上下文
|
|
21
|
+
|
|
22
|
+
该提示会自动包含:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Read this page, I want to ask questions about it. [URL]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
这允许 AI 助手在回答用户问题之前获取并理解页面内容。
|
|
29
|
+
|
|
30
|
+
## 支持的平台
|
|
31
|
+
|
|
32
|
+
该功能与多个流行的 AI 平台集成:
|
|
33
|
+
|
|
34
|
+
### 代码与开发工具
|
|
35
|
+
|
|
36
|
+
- **[Cursor](https://cursor.sh/)** - AI 驱动的代码编辑器
|
|
37
|
+
- **[v0](https://v0.dev/)** - Vercel 的 AI 界面设计工具
|
|
38
|
+
|
|
39
|
+
### 通用 AI 助手
|
|
40
|
+
|
|
41
|
+
- **[ChatGPT](https://chat.openai.com/)** - OpenAI 的对话式 AI
|
|
42
|
+
- **[Claude](https://claude.ai/)** - Anthropic 的 AI 助手
|
|
43
|
+
- **[T3](https://t3.gg/)** - T3 Stack 的 AI 助手
|
|
44
|
+
- **[Scira](https://scira.app/)** - AI 驱动的文档助手
|
|
45
|
+
|
|
46
|
+
## 配置
|
|
47
|
+
|
|
48
|
+
必须设置环境变量 `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`,有关详细信息,请参阅 [环境变量](/docs/env) 一节。
|
|
49
|
+
|
|
50
|
+
## 用户体验
|
|
51
|
+
|
|
52
|
+
### 桌面体验
|
|
53
|
+
|
|
54
|
+
**在聊天中打开** 按钮出现在目录侧边栏中,带有外部链接图标。点击该按钮会显示包含所有可用平台的下拉菜单。
|
|
55
|
+
|
|
56
|
+
### 平台特定行为
|
|
57
|
+
|
|
58
|
+
每个平台有其各自的集成方式:
|
|
59
|
+
|
|
60
|
+
- **基于浏览器的平台**(ChatGPT、Claude、v0):在新浏览器标签页中打开,并预填充提示
|
|
61
|
+
- **桌面应用**(Cursor):使用自定义 URL 方案打开以启动该应用
|
|
62
|
+
- **专业工具**(T3、Scira):使用平台特定的参数和上下文打开
|
|
63
|
+
|
|
64
|
+
## 优势
|
|
65
|
+
|
|
66
|
+
### 对于用户
|
|
67
|
+
|
|
68
|
+
1. **无缝工作流程** - 无需手动复制 URL 或切换上下文
|
|
69
|
+
2. **一致的体验** - 无论偏好的 AI 平台如何,都有相同的起点
|
|
70
|
+
3. **节省时间** - 通过适当的上下文即时获取 AI 助手的帮助
|
|
71
|
+
4. **工具选择自由** - 使用他们最熟悉的 AI 平台
|
|
72
|
+
|
|
73
|
+
### 对于文档作者
|
|
74
|
+
|
|
75
|
+
1. **增强支持** - 用户可以获得超出文档内容的帮助
|
|
76
|
+
2. **减轻支持负担** - AI 助手可以处理常见问题
|
|
77
|
+
3. **更好的用户参与度** - 用户可以更深入地探索主题
|
|
78
|
+
4. **平台灵活性** - 支持用户多样的 AI 偏好
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Open in Chat
|
|
3
|
+
description: Allow users to continue conversations in their preferred AI chat platform with a single click
|
|
4
|
+
type: conceptual
|
|
5
|
+
summary: Transfer documentation context to AI chat platforms like ChatGPT, Claude, Cursor, and v0 with a single click.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/ask-ai
|
|
8
|
+
- /docs/env
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
The "Open in Chat" feature enables users to seamlessly transfer documentation context to their preferred AI assistant. With a single click, users can open the current page in external AI chat platforms like ChatGPT, Claude, v0, Cursor, and more.
|
|
12
|
+
|
|
13
|
+
## How It Works
|
|
14
|
+
|
|
15
|
+
On every documentation page, users will find an "Open in chat" button in the table of contents sidebar. When clicked, a menu appears with options to open the page in various AI platforms:
|
|
16
|
+
|
|
17
|
+
1. User clicks "Open in chat"
|
|
18
|
+
2. A dropdown menu shows available platforms
|
|
19
|
+
3. User selects their preferred AI assistant
|
|
20
|
+
4. The platform opens with a pre-filled prompt containing the page URL and context
|
|
21
|
+
|
|
22
|
+
The prompt automatically includes:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Read this page, I want to ask questions about it. [URL]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This allows the AI assistant to fetch and understand the page content before answering user questions.
|
|
29
|
+
|
|
30
|
+
## Supported Platforms
|
|
31
|
+
|
|
32
|
+
The feature integrates with multiple popular AI platforms:
|
|
33
|
+
|
|
34
|
+
### Code & Development Tools
|
|
35
|
+
|
|
36
|
+
- **[Cursor](https://cursor.sh/)** - AI-powered code editor
|
|
37
|
+
- **[v0](https://v0.dev/)** - Vercel's AI interface design tool
|
|
38
|
+
|
|
39
|
+
### General AI Assistants
|
|
40
|
+
|
|
41
|
+
- **[ChatGPT](https://chat.openai.com/)** - OpenAI's conversational AI
|
|
42
|
+
- **[Claude](https://claude.ai/)** - Anthropic's AI assistant
|
|
43
|
+
- **[T3](https://t3.gg/)** - T3 Stack AI assistant
|
|
44
|
+
- **[Scira](https://scira.app/)** - AI-powered documentation assistant
|
|
45
|
+
|
|
46
|
+
## Configuration
|
|
47
|
+
|
|
48
|
+
The environment variable `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` must be set, which you can read more about in the [Environment Variables](/docs/env) section.
|
|
49
|
+
|
|
50
|
+
## User Experience
|
|
51
|
+
|
|
52
|
+
### Desktop Experience
|
|
53
|
+
|
|
54
|
+
The "Open in chat" button appears in the table of contents sidebar with an external link icon. Clicking it reveals a dropdown menu with all available platforms.
|
|
55
|
+
|
|
56
|
+
### Platform-Specific Behavior
|
|
57
|
+
|
|
58
|
+
Each platform has its own integration:
|
|
59
|
+
|
|
60
|
+
- **Browser-based platforms** (ChatGPT, Claude, v0): Open in a new browser tab with the prompt pre-filled
|
|
61
|
+
- **Desktop applications** (Cursor): Open using a custom URL scheme that launches the application
|
|
62
|
+
- **Specialized tools** (T3, Scira): Open with platform-specific parameters and context
|
|
63
|
+
|
|
64
|
+
## Benefits
|
|
65
|
+
|
|
66
|
+
### For Users
|
|
67
|
+
|
|
68
|
+
1. **Seamless Workflow** - No need to manually copy URLs or switch contexts
|
|
69
|
+
2. **Consistent Experience** - Same starting point regardless of preferred AI platform
|
|
70
|
+
3. **Time Saving** - Instant access to AI assistance with proper context
|
|
71
|
+
4. **Choice of Tools** - Use the AI platform they're most comfortable with
|
|
72
|
+
|
|
73
|
+
### For Documentation Authors
|
|
74
|
+
|
|
75
|
+
1. **Enhanced Support** - Users can get help beyond what's in the docs
|
|
76
|
+
2. **Reduced Support Burden** - AI assistants handle common questions
|
|
77
|
+
3. **Better User Engagement** - Users can explore topics more deeply
|
|
78
|
+
4. **Platform Flexibility** - Support users' diverse AI preferences
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Geistdocs 提供者
|
|
3
|
+
description: 处理通知、搜索和分析的根提供者组件
|
|
4
|
+
type: reference
|
|
5
|
+
summary: 包裹应用程序的根提供者组件,处理通知提示、搜索和分析功能。
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
related:
|
|
9
|
+
- /docs/configuration
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
The `GeistdocsProvider` 是一个包装组件,位于应用的根部。它包装了 Fumadocs 的 `RootProvider`,并添加了 Geistdocs 特有的功能,使一切无缝运行。
|
|
13
|
+
|
|
14
|
+
## 它的作用
|
|
15
|
+
|
|
16
|
+
该提供者为您处理以下主要事项:
|
|
17
|
+
|
|
18
|
+
2. **Toast 通知** - 提供一个全局通知系统,用于向用户反馈
|
|
19
|
+
3. **分析** - 集成 Vercel Analytics,用于跟踪页面浏览和性能
|
|
20
|
+
4. **搜索** - 配置搜索对话框并将其连接到您的搜索 API
|
|
21
|
+
|
|
22
|
+
## 用法
|
|
23
|
+
|
|
24
|
+
确保在根布局中使用该提供者包裹您的应用:
|
|
25
|
+
|
|
26
|
+
```tsx title="app/layout.tsx"
|
|
27
|
+
import { GeistdocsProvider } from "@/components/geistdocs/provider";
|
|
28
|
+
|
|
29
|
+
const Layout = ({ children }: LayoutProps) => (
|
|
30
|
+
<html lang="en">
|
|
31
|
+
<body>
|
|
32
|
+
<GeistdocsProvider>
|
|
33
|
+
<Navbar />
|
|
34
|
+
{children}
|
|
35
|
+
</GeistdocsProvider>
|
|
36
|
+
</body>
|
|
37
|
+
</html>
|
|
38
|
+
);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
就这些。提供者会自动处理所有事项。
|
|
42
|
+
|
|
43
|
+
## AI 侧边栏
|
|
44
|
+
|
|
45
|
+
当用户在桌面端打开 AI 聊天时,提供者会自动添加内边距,以防止内容被侧边栏遮挡。在移动端,聊天会以抽屉的形式打开,因此无需内边距。
|
|
46
|
+
|
|
47
|
+
您无需执行任何操作 —— 提供者会自动检测屏幕尺寸和聊天状态。
|
|
48
|
+
|
|
49
|
+
## Toast 通知
|
|
50
|
+
|
|
51
|
+
该提供者包含一个全局的 toast 通知系统。可在应用的任何位置使用:
|
|
52
|
+
|
|
53
|
+
```tsx title="page.tsx"
|
|
54
|
+
import { toast } from "sonner";
|
|
55
|
+
|
|
56
|
+
toast.success("Changes saved");
|
|
57
|
+
toast.error("Something went wrong");
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 分析
|
|
61
|
+
|
|
62
|
+
自动包含 Vercel Analytics,并跟踪:
|
|
63
|
+
|
|
64
|
+
- 页面浏览
|
|
65
|
+
- Web Vitals
|
|
66
|
+
- 用户交互
|
|
67
|
+
- 性能指标
|
|
68
|
+
|
|
69
|
+
无需配置 —— 部署到 Vercel 后会自动生效。
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Geistdocs Provider
|
|
3
|
+
description: The root provider component that handles notifications, search and analytics
|
|
4
|
+
type: reference
|
|
5
|
+
summary: The root provider component that wraps your application to handle toast notifications, search, and analytics.
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/getting-started
|
|
8
|
+
related:
|
|
9
|
+
- /docs/configuration
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
The `GeistdocsProvider` is a wrapper component that sits at the root of your application. It wraps Fumadocs' `RootProvider` and adds Geistdocs-specific functionality to make everything work seamlessly.
|
|
13
|
+
|
|
14
|
+
## What It Does
|
|
15
|
+
|
|
16
|
+
The provider handles these main things for you:
|
|
17
|
+
|
|
18
|
+
2. **Toast Notifications** - Provides a global notification system for user feedback
|
|
19
|
+
3. **Analytics** - Integrates Vercel Analytics for tracking page views and performance
|
|
20
|
+
4. **Search** - Configures the search dialog and connects it to your search API
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
Ensure your application is wrapped with the provider in your root layout:
|
|
25
|
+
|
|
26
|
+
```tsx title="app/layout.tsx"
|
|
27
|
+
import { GeistdocsProvider } from "@/components/geistdocs/provider";
|
|
28
|
+
|
|
29
|
+
const Layout = ({ children }: LayoutProps) => (
|
|
30
|
+
<html lang="en">
|
|
31
|
+
<body>
|
|
32
|
+
<GeistdocsProvider>
|
|
33
|
+
<Navbar />
|
|
34
|
+
{children}
|
|
35
|
+
</GeistdocsProvider>
|
|
36
|
+
</body>
|
|
37
|
+
</html>
|
|
38
|
+
);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
That's it. The provider handles everything automatically.
|
|
42
|
+
|
|
43
|
+
## AI Sidebar
|
|
44
|
+
|
|
45
|
+
When users open the AI chat on desktop, the provider automatically adds padding to prevent content from being hidden behind the sidebar. On mobile, the chat opens as a drawer instead, so no padding is needed.
|
|
46
|
+
|
|
47
|
+
You don't need to do anything - the provider detects the screen size and chat state automatically.
|
|
48
|
+
|
|
49
|
+
## Toast Notifications
|
|
50
|
+
|
|
51
|
+
The provider includes a global toast notification system. Use it anywhere in your app:
|
|
52
|
+
|
|
53
|
+
```tsx title="page.tsx"
|
|
54
|
+
import { toast } from "sonner";
|
|
55
|
+
|
|
56
|
+
toast.success("Changes saved");
|
|
57
|
+
toast.error("Something went wrong");
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Analytics
|
|
61
|
+
|
|
62
|
+
Vercel Analytics is automatically included and tracks:
|
|
63
|
+
|
|
64
|
+
- Page views
|
|
65
|
+
- Web Vitals
|
|
66
|
+
- User interactions
|
|
67
|
+
- Performance metrics
|
|
68
|
+
|
|
69
|
+
No configuration needed - it works automatically when deployed on Vercel.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: RSS
|
|
3
|
+
description: 通过为您的文档自动生成的 RSS 订阅源让用户保持更新
|
|
4
|
+
type: conceptual
|
|
5
|
+
summary: 自动生成的 RSS 2.0 订阅源,在文档发布或更新时通知用户。
|
|
6
|
+
related:
|
|
7
|
+
- /docs/env
|
|
8
|
+
- /docs/configuration
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
RSS 功能为您的文档提供了一个自动生成的 RSS 2.0 订阅源。用户可以订阅该订阅源,在发布新内容或修改现有页面时及时收到通知。
|
|
12
|
+
|
|
13
|
+
## 工作原理
|
|
14
|
+
|
|
15
|
+
Geistdocs 会自动生成一个包含以下内容的 RSS 订阅源:
|
|
16
|
+
|
|
17
|
+
- 所有已发布的文档页面
|
|
18
|
+
- 页面标题和描述
|
|
19
|
+
- 每页的直接链接
|
|
20
|
+
- 最后修改日期
|
|
21
|
+
- 作者信息
|
|
22
|
+
|
|
23
|
+
订阅源会在每次请求时重新生成,确保订阅者始终收到有关文档的最新信息。
|
|
24
|
+
|
|
25
|
+
## 访问订阅源
|
|
26
|
+
|
|
27
|
+
RSS 订阅源可通过以下地址访问:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
https://your-domain.com/rss.xml
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
用户可以使用以下方式订阅该 URL:
|
|
34
|
+
|
|
35
|
+
- RSS 阅读器 (Feedly, Inoreader, NewsBlur)
|
|
36
|
+
- 电子邮件服务 (Blogtrottr, Kill the Newsletter)
|
|
37
|
+
- 浏览器扩展
|
|
38
|
+
- 新闻聚合器
|
|
39
|
+
|
|
40
|
+
### RSS 按钮
|
|
41
|
+
|
|
42
|
+
导航栏中会显示一个便捷的 RSS 按钮,方便用户发现并订阅您的订阅源。单击该按钮会在新标签页中打开 RSS XML。
|
|
43
|
+
|
|
44
|
+
## 订阅源格式
|
|
45
|
+
|
|
46
|
+
该 RSS 订阅源遵循 RSS 2.0 规范,并包含以下内容:
|
|
47
|
+
|
|
48
|
+
### 频道元数据
|
|
49
|
+
|
|
50
|
+
```xml
|
|
51
|
+
<channel>
|
|
52
|
+
<title>Your Documentation Title</title>
|
|
53
|
+
<link>https://your-domain.com</link>
|
|
54
|
+
<language>en</language>
|
|
55
|
+
<image>https://your-domain.com/banner.png</image>
|
|
56
|
+
<copyright>All rights reserved [Year], [Your Organization]</copyright>
|
|
57
|
+
</channel>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 条目格式
|
|
61
|
+
|
|
62
|
+
每个文档页面都会作为一个条目出现:
|
|
63
|
+
|
|
64
|
+
```xml
|
|
65
|
+
<item>
|
|
66
|
+
<guid>page-url</guid>
|
|
67
|
+
<title>Page Title</title>
|
|
68
|
+
<description>Page description</description>
|
|
69
|
+
<link>https://your-domain.com/docs/page-url</link>
|
|
70
|
+
<pubDate>Thu, 12 Nov 2025 00:00:00 GMT</pubDate>
|
|
71
|
+
<author>
|
|
72
|
+
<name>Your Organization</name>
|
|
73
|
+
</author>
|
|
74
|
+
</item>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 配置
|
|
78
|
+
|
|
79
|
+
RSS 订阅源要求设置 `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` 环境变量,您可以在 [环境变量](/docs/env) 一节中阅读更多信息。
|
|
80
|
+
|
|
81
|
+
它还需要在 Geistdocs 配置文件中导出一个 `title`,您可以在 [配置](/docs/configuration) 一节中阅读更多信息。
|
|
82
|
+
|
|
83
|
+
## 功能
|
|
84
|
+
|
|
85
|
+
### 自动更新
|
|
86
|
+
|
|
87
|
+
订阅源会自动包含:
|
|
88
|
+
|
|
89
|
+
- 新创建的页面
|
|
90
|
+
- 已更新的页面内容(使用最后修改日期)
|
|
91
|
+
- 更改的标题或描述
|
|
92
|
+
- 来自您的文档源的所有页面
|
|
93
|
+
|
|
94
|
+
### 最后修改日期
|
|
95
|
+
|
|
96
|
+
页面使用它们的 `lastModified` frontmatter 字段,或回退到当前日期:
|
|
97
|
+
|
|
98
|
+
```mdx title="content/docs/example.mdx"
|
|
99
|
+
---
|
|
100
|
+
title: Example Page
|
|
101
|
+
description: An example documentation page
|
|
102
|
+
lastModified: 2025-11-12
|
|
103
|
+
---
|
|
104
|
+
```
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: RSS
|
|
3
|
+
description: Keep users updated with an automatically generated RSS feed for your documentation
|
|
4
|
+
type: conceptual
|
|
5
|
+
summary: An automatically generated RSS 2.0 feed that keeps users informed when documentation is published or updated.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/env
|
|
8
|
+
- /docs/configuration
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
The RSS feature provides an automatically generated RSS 2.0 feed for your documentation. This allows users to subscribe to updates and stay informed when new content is published or existing pages are modified.
|
|
12
|
+
|
|
13
|
+
## How It Works
|
|
14
|
+
|
|
15
|
+
Geistdocs automatically generates an RSS feed that includes:
|
|
16
|
+
|
|
17
|
+
- All published documentation pages
|
|
18
|
+
- Page titles and descriptions
|
|
19
|
+
- Direct links to each page
|
|
20
|
+
- Last modified dates
|
|
21
|
+
- Author information
|
|
22
|
+
|
|
23
|
+
The feed is regenerated on each request, ensuring subscribers always receive the most current information about your documentation.
|
|
24
|
+
|
|
25
|
+
## Accessing the Feed
|
|
26
|
+
|
|
27
|
+
The RSS feed is available at:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
https://your-domain.com/rss.xml
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Users can subscribe to this URL using:
|
|
34
|
+
|
|
35
|
+
- RSS readers (Feedly, Inoreader, NewsBlur)
|
|
36
|
+
- Email services (Blogtrottr, Kill the Newsletter)
|
|
37
|
+
- Browser extensions
|
|
38
|
+
- News aggregators
|
|
39
|
+
|
|
40
|
+
### RSS Button
|
|
41
|
+
|
|
42
|
+
A convenient RSS button appears in the navigation bar, making it easy for users to discover and subscribe to your feed. Clicking the button opens the RSS XML in a new tab.
|
|
43
|
+
|
|
44
|
+
## Feed Format
|
|
45
|
+
|
|
46
|
+
The RSS feed follows the RSS 2.0 specification and includes:
|
|
47
|
+
|
|
48
|
+
### Channel Metadata
|
|
49
|
+
|
|
50
|
+
```xml
|
|
51
|
+
<channel>
|
|
52
|
+
<title>Your Documentation Title</title>
|
|
53
|
+
<link>https://your-domain.com</link>
|
|
54
|
+
<language>en</language>
|
|
55
|
+
<image>https://your-domain.com/banner.png</image>
|
|
56
|
+
<copyright>All rights reserved [Year], [Your Organization]</copyright>
|
|
57
|
+
</channel>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Item Format
|
|
61
|
+
|
|
62
|
+
Each documentation page appears as an item:
|
|
63
|
+
|
|
64
|
+
```xml
|
|
65
|
+
<item>
|
|
66
|
+
<guid>page-url</guid>
|
|
67
|
+
<title>Page Title</title>
|
|
68
|
+
<description>Page description</description>
|
|
69
|
+
<link>https://your-domain.com/docs/page-url</link>
|
|
70
|
+
<pubDate>Thu, 12 Nov 2025 00:00:00 GMT</pubDate>
|
|
71
|
+
<author>
|
|
72
|
+
<name>Your Organization</name>
|
|
73
|
+
</author>
|
|
74
|
+
</item>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Configuration
|
|
78
|
+
|
|
79
|
+
The RSS feed requires the `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` environment variable to be set, which you can read more about in the [Environment Variables](/docs/env) section.
|
|
80
|
+
|
|
81
|
+
It also requires a `title` exported from the Geistdocs configuration file, which you can read more about in the [Configuration](/docs/configuration) section.
|
|
82
|
+
|
|
83
|
+
## Features
|
|
84
|
+
|
|
85
|
+
### Automatic Updates
|
|
86
|
+
|
|
87
|
+
The feed automatically includes:
|
|
88
|
+
|
|
89
|
+
- Newly created pages
|
|
90
|
+
- Updated page content (using last modified dates)
|
|
91
|
+
- Changed titles or descriptions
|
|
92
|
+
- All pages from your documentation source
|
|
93
|
+
|
|
94
|
+
### Last Modified Dates
|
|
95
|
+
|
|
96
|
+
Pages use their `lastModified` frontmatter field or fall back to the current date:
|
|
97
|
+
|
|
98
|
+
```mdx title="content/docs/example.mdx"
|
|
99
|
+
---
|
|
100
|
+
title: Example Page
|
|
101
|
+
description: An example documentation page
|
|
102
|
+
lastModified: 2025-11-12
|
|
103
|
+
---
|
|
104
|
+
```
|