@vercel/geistdocs 1.25.1-canary.4e75e60 → 1.25.1-canary.62250e6
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 +1 -1
- package/dist/components/code-block-tabs.js +1 -1
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +1 -1
- package/dist/components/copy-prompt.js +1 -1
- package/dist/components/image.d.ts +19 -0
- package/dist/components/image.d.ts.map +1 -0
- package/dist/components/image.js +9 -0
- package/dist/components/steps.d.ts +9 -0
- package/dist/components/steps.d.ts.map +1 -0
- package/dist/components/steps.js +9 -0
- package/dist/internal/chat/activity.d.ts +20 -0
- package/dist/internal/chat/activity.d.ts.map +1 -0
- package/dist/internal/chat/activity.js +43 -0
- package/dist/internal/chat/message-metadata.d.ts.map +1 -1
- package/dist/internal/chat/message-metadata.js +15 -30
- package/dist/internal/chat/message-sources.d.ts +3 -0
- package/dist/internal/chat/message-sources.d.ts.map +1 -0
- package/dist/internal/chat/message-sources.js +23 -0
- package/dist/internal/chat/message.d.ts.map +1 -1
- package/dist/internal/chat/message.js +44 -10
- package/dist/internal/chat/shell.d.ts.map +1 -1
- package/dist/internal/chat/shell.js +7 -2
- package/dist/internal/chat/source-chunks.d.ts +9 -0
- package/dist/internal/chat/source-chunks.d.ts.map +1 -0
- package/dist/internal/chat/source-chunks.js +7 -0
- package/dist/internal/chat/sources.d.ts +1 -1
- package/dist/internal/chat/sources.d.ts.map +1 -1
- package/dist/internal/chat/sources.js +6 -3
- package/dist/internal/link-href.d.ts +13 -0
- package/dist/internal/link-href.d.ts.map +1 -0
- package/dist/internal/link-href.js +51 -0
- package/dist/internal/mdx-to-markdown.d.ts +3 -0
- package/dist/internal/mdx-to-markdown.d.ts.map +1 -0
- package/dist/internal/mdx-to-markdown.js +166 -0
- package/dist/internal/react-node-text.d.ts +4 -0
- package/dist/internal/react-node-text.d.ts.map +1 -0
- package/dist/internal/react-node-text.js +11 -0
- package/dist/internal/search.js +1 -1
- package/dist/internal/sidebar-tree.d.ts.map +1 -1
- package/dist/internal/sidebar-tree.js +6 -1
- package/dist/internal/toc-items.d.ts.map +1 -1
- package/dist/internal/toc-items.js +2 -1
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +5 -0
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +10 -5
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +30 -13
- package/dist/routes/llms.d.ts +1 -1
- package/dist/routes/llms.d.ts.map +1 -1
- package/dist/routes/llms.js +12 -2
- package/dist/source-config.d.ts +10 -0
- package/dist/source-config.d.ts.map +1 -1
- package/dist/source-config.js +20 -2
- package/dist/source.d.ts +10 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +75 -34
- package/dist/versions.js +2 -2
- package/docs/agents.md +5 -3
- package/docs/llms.txt +388 -28
- package/docs/manifest.json +21 -3
- package/docs/pages/components/steps.md +129 -0
- package/docs/pages/deployment.md +30 -5
- package/docs/pages/getting-started.md +38 -12
- package/docs/pages/guides/nested-navigation.md +1 -1
- package/docs/pages/md.md +24 -5
- package/docs/pages/migration-2.md +106 -0
- package/docs/pages/migration.md +5 -2
- package/docs/pages/syntax.md +42 -0
- package/docs/sitemap.md +4 -2
- package/package.json +14 -4
- package/source-config.js +37 -2
- package/template/content/docs/components/meta.json +4 -0
- package/template/content/docs/components/steps.mdx +125 -0
- package/template/content/docs/deployment.mdx +31 -6
- package/template/content/docs/getting-started.mdx +39 -13
- package/template/content/docs/guides/nested-navigation.mdx +1 -1
- package/template/content/docs/md.mdx +24 -5
- package/template/content/docs/meta.json +3 -0
- package/template/content/docs/migration-2.mdx +106 -0
- package/template/content/docs/migration.mdx +5 -1
- package/template/content/docs/syntax.mdx +42 -0
- package/template/next.config.ts +9 -0
- package/template/package.json +3 -3
- package/theme.css +50 -4
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Steps
|
|
3
|
+
description: Render numbered step-by-step instructions from Markdown headings or the Steps and Step components
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Write consecutive headings that start with a number, such as "### 1. Install", to render a numbered step list. The Steps and Step components cover cases where a heading must be wrapped in another component.
|
|
6
|
+
url: /docs/components/steps
|
|
7
|
+
source: apps/template/content/docs/components/steps.mdx
|
|
8
|
+
prerequisites:
|
|
9
|
+
- /docs/syntax
|
|
10
|
+
related:
|
|
11
|
+
- /docs/syntax
|
|
12
|
+
- /docs/table-of-contents
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Steps
|
|
16
|
+
|
|
17
|
+
Steps render sequential instructions as a numbered list with a counter beside each step heading. You write them as plain Markdown headings, so a page needs no imports and stays readable in Markdown output.
|
|
18
|
+
|
|
19
|
+
## Write steps as numbered headings
|
|
20
|
+
|
|
21
|
+
Start each step heading with a number, a period, and a space. Consecutive headings at the same depth that follow this pattern become one step list.
|
|
22
|
+
|
|
23
|
+
````md
|
|
24
|
+
## Deploy the project
|
|
25
|
+
|
|
26
|
+
### 1. Install the CLI
|
|
27
|
+
|
|
28
|
+
Install the Vercel CLI globally.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pnpm add -g vercel
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 2. Link the project
|
|
35
|
+
|
|
36
|
+
Run `vercel link` in the project directory and pick the team and project.
|
|
37
|
+
|
|
38
|
+
### 3. Deploy
|
|
39
|
+
|
|
40
|
+
Run `vercel deploy` to create a preview deployment.
|
|
41
|
+
|
|
42
|
+
## Next section
|
|
43
|
+
````
|
|
44
|
+
|
|
45
|
+
This renders as:
|
|
46
|
+
|
|
47
|
+
### 1. Install the CLI
|
|
48
|
+
|
|
49
|
+
Install the Vercel CLI globally.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pnpm add -g vercel
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 2. Link the project
|
|
56
|
+
|
|
57
|
+
Run `vercel link` in the project directory and pick the team and project.
|
|
58
|
+
|
|
59
|
+
### 3. Deploy
|
|
60
|
+
|
|
61
|
+
Run `vercel deploy` to create a preview deployment.
|
|
62
|
+
|
|
63
|
+
## How numbering and anchors work
|
|
64
|
+
|
|
65
|
+
Geistdocs removes the `1. ` prefix from the heading text at build time and draws the number with a CSS counter. As a result:
|
|
66
|
+
|
|
67
|
+
- The table of contents shows `Install the CLI`, not `1. Install the CLI`.
|
|
68
|
+
- The heading anchor is `#install-the-cli`, so renumbering steps does not break links.
|
|
69
|
+
- Custom anchors written as `### 1. Install the CLI [#install]` keep working.
|
|
70
|
+
- Markdown routes and `llms.txt` output numbered headings, such as `### 1. Install the CLI`, which read naturally for agents.
|
|
71
|
+
|
|
72
|
+
The numbers you write are only used to detect steps. Geistdocs always counts from 1, so `### 4. Deploy` at the start of a list renders as step 1.
|
|
73
|
+
|
|
74
|
+
## Rules for grouping steps
|
|
75
|
+
|
|
76
|
+
Geistdocs groups headings into a step list using these rules:
|
|
77
|
+
|
|
78
|
+
| Situation | Result |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| Consecutive numbered headings at the same depth | One step list |
|
|
81
|
+
| A deeper heading inside a step, such as `#### Options` under `### 2. Configure` | Part of the current step |
|
|
82
|
+
| A heading at the same or shallower depth without a number prefix | Ends the step list |
|
|
83
|
+
| A numbered heading where inline code or a link immediately follows the number, such as `` ### 1. `vercel login` `` | Not detected as a step; move a word before the code, such as `` ### 1. Run `vercel login` `` |
|
|
84
|
+
|
|
85
|
+
Paragraphs, lists, code blocks, callouts, and images between two step headings belong to the earlier step.
|
|
86
|
+
|
|
87
|
+
## Use the Steps and Step components
|
|
88
|
+
|
|
89
|
+
Use the components when a step heading has to be wrapped in another component, for example a framework switcher, and the heading pattern cannot be detected. Both components are in the default MDX component map and are exported from `@vercel/geistdocs/components/steps`.
|
|
90
|
+
|
|
91
|
+
```mdx
|
|
92
|
+
<Steps>
|
|
93
|
+
<Step>
|
|
94
|
+
### Install the package
|
|
95
|
+
|
|
96
|
+
Run the install command for your package manager.
|
|
97
|
+
</Step>
|
|
98
|
+
<Step>
|
|
99
|
+
### Configure the project
|
|
100
|
+
|
|
101
|
+
Add the configuration file to the project root.
|
|
102
|
+
</Step>
|
|
103
|
+
</Steps>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This renders as:
|
|
107
|
+
|
|
108
|
+
<Steps>
|
|
109
|
+
<Step>
|
|
110
|
+
### Install the package
|
|
111
|
+
|
|
112
|
+
Run the install command for your package manager.
|
|
113
|
+
</Step>
|
|
114
|
+
<Step>
|
|
115
|
+
### Configure the project
|
|
116
|
+
|
|
117
|
+
Add the configuration file to the project root.
|
|
118
|
+
</Step>
|
|
119
|
+
</Steps>
|
|
120
|
+
|
|
121
|
+
Do not add a number prefix to headings inside `Step`. The component draws the counter, and a prefix would create a nested step list.
|
|
122
|
+
|
|
123
|
+
### Props
|
|
124
|
+
|
|
125
|
+
`Steps` and `Step` accept the standard `div` attributes. Both forward `className`, which is merged with the `fd-steps` and `fd-step` classes that carry the counter styling.
|
|
126
|
+
|
|
127
|
+
## Markdown output
|
|
128
|
+
|
|
129
|
+
In `.md` routes and `llms.txt`, each step list becomes plain numbered headings, such as `### 1. Install the CLI`, followed by the step content. This applies to steps written as headings and to steps written with `Steps` and `Step`, so agents read the same sequence without the wrapper markup.
|
package/docs/pages/deployment.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: Deploy to Vercel
|
|
3
3
|
description: Learn how to deploy your Geistdocs site to Vercel
|
|
4
4
|
type: guide
|
|
5
|
-
summary: Deploy
|
|
5
|
+
summary: Deploy a Geistdocs site to Vercel with the required project settings, environment variables, and private-package access.
|
|
6
6
|
url: /docs/deployment
|
|
7
7
|
source: apps/template/content/docs/deployment.mdx
|
|
8
8
|
prerequisites:
|
|
@@ -14,9 +14,9 @@ related:
|
|
|
14
14
|
|
|
15
15
|
# Deploy to Vercel
|
|
16
16
|
|
|
17
|
-
Deploy a Geistdocs site to Vercel as a Next.js app.
|
|
17
|
+
Deploy a Geistdocs site to Vercel as a Next.js app. Configure private package access, environment variables, and the production URL before shipping.
|
|
18
18
|
|
|
19
|
-
Help me deploy this Geistdocs project to Vercel.
|
|
19
|
+
Help me deploy this Geistdocs 2.0 project to Vercel. Verify private npm access for its Geistcn dependencies, then review the package scripts, environment variables, GitHub Actions authentication, and Vercel project settings.
|
|
20
20
|
|
|
21
21
|
## Prerequisites
|
|
22
22
|
|
|
@@ -26,6 +26,31 @@ Before deploying, you need:
|
|
|
26
26
|
- A [Vercel account](https://vercel.com) (sign up at [vercel.com](https://vercel.com))
|
|
27
27
|
- Your Vercel account connected to your GitHub account
|
|
28
28
|
- Environment variables ready (see [Environment Variables](/docs/env))
|
|
29
|
+
- Access to the restricted `@vercel` npm packages
|
|
30
|
+
|
|
31
|
+
## Configure private package access
|
|
32
|
+
|
|
33
|
+
Geistdocs 2.0 depends on restricted `@vercel/geistcn` and `@vercel/geistcn-assets` packages. Package installation fails without npm authentication.
|
|
34
|
+
|
|
35
|
+
For a Vercel deployment, ask `#help-core-platform` to add your Vercel project to the shared `NPM_TOKEN` environment variable list. Include the project link and required environments. Do not copy the shared token into the repository or project documentation.
|
|
36
|
+
|
|
37
|
+
For GitHub Actions, ask `#help-it` to allow the repository to use the `NPM_TOKEN` organization secret, then pass it to the install step:
|
|
38
|
+
|
|
39
|
+
```yaml title=".github/workflows/check.yml"
|
|
40
|
+
- uses: pnpm/action-setup@v4
|
|
41
|
+
|
|
42
|
+
- uses: actions/setup-node@v4
|
|
43
|
+
with:
|
|
44
|
+
node-version: 20
|
|
45
|
+
cache: pnpm
|
|
46
|
+
registry-url: https://registry.npmjs.org
|
|
47
|
+
|
|
48
|
+
- run: pnpm install
|
|
49
|
+
env:
|
|
50
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Read [How do I use private dependencies with Vercel?](https://vercel.com/kb/guide/using-private-dependencies-with-vercel) for the platform authentication behavior.
|
|
29
54
|
|
|
30
55
|
## Deploy to Vercel
|
|
31
56
|
|
|
@@ -35,9 +60,9 @@ To deploy from the Vercel dashboard:
|
|
|
35
60
|
2. Select your Geistdocs repository
|
|
36
61
|
3. Configure your project settings:
|
|
37
62
|
- **Framework Preset**: Next.js (automatically detected)
|
|
38
|
-
- **Build Command**: `pnpm build`
|
|
63
|
+
- **Build Command**: `pnpm build`
|
|
39
64
|
- **Output Directory**: `.next` (default)
|
|
40
|
-
- **Install Command**: `pnpm install`
|
|
65
|
+
- **Install Command**: `pnpm install`
|
|
41
66
|
4. Add your environment variables (see [Environment Variables](/docs/env))
|
|
42
67
|
5. Click "Deploy"
|
|
43
68
|
|
|
@@ -14,39 +14,47 @@ related:
|
|
|
14
14
|
|
|
15
15
|
# Getting Started
|
|
16
16
|
|
|
17
|
-
Create a Geistdocs site with the package CLI, then
|
|
17
|
+
Create a new Geistdocs 2.0 site with the package CLI, then customize its identity, content, and navigation. If you already have a documentation site, use [Migrate to Geistdocs](/docs/migration) or [Migrate 1.x → 2.0](/docs/migration-2) instead.
|
|
18
18
|
|
|
19
|
-
Create a Geistdocs project with `pnpm dlx @vercel/geistdocs init --name my-docs`.
|
|
19
|
+
Create a new Geistdocs project with `pnpm dlx @vercel/geistdocs@latest init --name my-docs`. Confirm the prerequisites, run `pnpm dev`, and help me customize `geistdocs.tsx`, `content/docs/index.mdx`, and `content/docs/meta.json`. Keep the generated integrations package-backed.
|
|
20
20
|
|
|
21
21
|
## Prerequisites
|
|
22
22
|
|
|
23
23
|
Before you begin, install:
|
|
24
24
|
|
|
25
|
-
- Node.js
|
|
26
|
-
- pnpm
|
|
25
|
+
- Node.js 20.9 or later
|
|
26
|
+
- pnpm
|
|
27
27
|
- Git
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
The CLI always uses pnpm to install the generated project's dependencies.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
## Authenticate package access
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
Geistdocs 2.0 depends on restricted `@vercel/geistcn` and `@vercel/geistcn-assets` packages. Configure your user-level `~/.npmrc` before running the CLI:
|
|
34
|
+
|
|
35
|
+
```ini title="~/.npmrc"
|
|
36
|
+
@vercel:registry=https://registry.npmjs.org/
|
|
37
|
+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
|
38
|
+
always-auth=true
|
|
35
39
|
```
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
Set `NPM_TOKEN` from an approved internal source. Never put the token value in `.npmrc`, an `.env` file, shell history, or Git. See [Deploy to Vercel](/docs/deployment#configure-private-package-access) for automated installs.
|
|
42
|
+
|
|
43
|
+
## Create a project
|
|
44
|
+
|
|
45
|
+
Run the Geistdocs CLI from an empty parent folder:
|
|
38
46
|
|
|
39
47
|
```bash title="Terminal"
|
|
40
|
-
|
|
48
|
+
pnpm dlx @vercel/geistdocs@latest init --name my-docs
|
|
41
49
|
```
|
|
42
50
|
|
|
43
51
|
The CLI copies the template bundled in the package, rewrites the generated app to depend on the same `@vercel/geistdocs` version, installs dependencies, copies `.env.example` to `.env.local`, and initializes Git.
|
|
44
52
|
|
|
45
53
|
## Understand generated dependencies
|
|
46
54
|
|
|
47
|
-
Generated projects
|
|
55
|
+
Generated projects pin the resolved `@vercel/geistdocs` version and include its matching Geistcn dependencies, AI SDK v6, and `@ai-sdk/react` v3. The template already configures styles, fonts, Cache Components, Partial Prefetching, source adapters, search, Ask AI, and agent-readable routes.
|
|
48
56
|
|
|
49
|
-
|
|
57
|
+
Keep those integrations package-backed. Update Geistdocs instead of copying package internals into the app.
|
|
50
58
|
|
|
51
59
|
## Start the development server
|
|
52
60
|
|
|
@@ -59,6 +67,14 @@ pnpm dev
|
|
|
59
67
|
|
|
60
68
|
Open `http://localhost:3000` in your browser.
|
|
61
69
|
|
|
70
|
+
Start with these files:
|
|
71
|
+
|
|
72
|
+
- `geistdocs.tsx` for the site title, logo, navigation, repository, and AI prompt.
|
|
73
|
+
- `content/docs/index.mdx` for the documentation overview.
|
|
74
|
+
- `content/docs/meta.json` for sidebar order and groups.
|
|
75
|
+
|
|
76
|
+
Only customize `components/geistdocs/*`, `lib/geistdocs/*`, or route adapters when the generated defaults do not fit your site.
|
|
77
|
+
|
|
62
78
|
## Edit your first page
|
|
63
79
|
|
|
64
80
|
Docs live in `content/docs`. Edit the overview page:
|
|
@@ -116,3 +132,13 @@ pnpm exec geistdocs update
|
|
|
116
132
|
```
|
|
117
133
|
|
|
118
134
|
Review and test dependency changes before committing.
|
|
135
|
+
|
|
136
|
+
## Verify and deploy
|
|
137
|
+
|
|
138
|
+
Run a production build before publishing:
|
|
139
|
+
|
|
140
|
+
```bash title="Terminal"
|
|
141
|
+
pnpm build
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Then follow [Deploy to Vercel](/docs/deployment), including private package access and environment-variable setup.
|
|
@@ -200,7 +200,7 @@ Geistdocs applies a color for each method:
|
|
|
200
200
|
| `PUT`, `PATCH` | Amber |
|
|
201
201
|
| `DEL`, `DELETE` | Red |
|
|
202
202
|
|
|
203
|
-
Method matching is case-sensitive, so use uppercase labels. `DEL` and `DELETE` render the same red badge, so prefer `DEL` when you want a narrower badge.
|
|
203
|
+
Method matching is case-sensitive, so use uppercase labels. `DEL` and `DELETE` render the same red badge, so prefer `DEL` when you want a narrower badge. `New` renders as a low-contrast blue badge; other labels, such as `Beta`, use the default neutral badge. Badge colors adapt to light and dark themes automatically.
|
|
204
204
|
|
|
205
205
|
## Add links to the navigation
|
|
206
206
|
|
package/docs/pages/md.md
CHANGED
|
@@ -13,7 +13,7 @@ related:
|
|
|
13
13
|
|
|
14
14
|
# .md Extension
|
|
15
15
|
|
|
16
|
-
Geistdocs lets AI tools and language models access documentation pages as plain Markdown. Append `.md` or `.mdx` to a documentation URL to get the
|
|
16
|
+
Geistdocs lets AI tools and language models access documentation pages as plain Markdown. Append `.md` or `.mdx` to a documentation URL to get the page content with presentation-only MDX components removed.
|
|
17
17
|
|
|
18
18
|
Help me test raw Markdown routes in this Geistdocs project. Fetch a docs page with `.mdx` appended, compare it to the rendered page, and explain how AI tools can use it.
|
|
19
19
|
|
|
@@ -33,8 +33,8 @@ https://yourdomain.com/docs/getting-started.mdx
|
|
|
33
33
|
|
|
34
34
|
The `.mdx` version returns:
|
|
35
35
|
|
|
36
|
-
-
|
|
37
|
-
- The full
|
|
36
|
+
- Frontmatter with the canonical page URL, docs index, and last-updated date when available
|
|
37
|
+
- The full page content as plain Markdown
|
|
38
38
|
- No HTML, styling, or navigation
|
|
39
39
|
|
|
40
40
|
For a docs section mounted at `/docs`, the section root remains `/docs.md`. For a source mounted at the app root with `baseUrl: "/"`, Geistdocs uses `/index.md` for the root page. If Next.js has `basePath: "/docs"`, that public root Markdown URL is `/docs/index.md`.
|
|
@@ -83,11 +83,30 @@ The response includes:
|
|
|
83
83
|
|
|
84
84
|
- Content-Type: `text/markdown`
|
|
85
85
|
- `Link: <canonical page URL>; rel="canonical"` for resolved pages
|
|
86
|
-
-
|
|
87
|
-
-
|
|
86
|
+
- Frontmatter with page metadata and discovery links
|
|
87
|
+
- Page content with presentation-only MDX components removed
|
|
88
88
|
|
|
89
89
|
All MDX components are processed and converted to plain Markdown equivalents.
|
|
90
90
|
|
|
91
|
+
### Customize frontmatter
|
|
92
|
+
|
|
93
|
+
Geistdocs generates `title`, `description`, `url`, `docs_index`, and `lastUpdated` when their values are available, along with supported page frontmatter such as `prerequisites` and `related`. Add product-specific fields or override defaults with the source `markdown.frontmatter` hook:
|
|
94
|
+
|
|
95
|
+
```ts title="lib/geistdocs/source.ts"
|
|
96
|
+
export const geistdocsSource = createSource({
|
|
97
|
+
config,
|
|
98
|
+
docs,
|
|
99
|
+
markdown: {
|
|
100
|
+
frontmatter: (defaults) => ({
|
|
101
|
+
docs_index: "/docs/llms.txt",
|
|
102
|
+
version: "16.3.4",
|
|
103
|
+
}),
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The callback returns only additions and overrides; Geistdocs keeps the remaining generated fields from `defaults`.
|
|
109
|
+
|
|
91
110
|
## Missing documentation pages
|
|
92
111
|
|
|
93
112
|
When a Markdown request does not match a page, Geistdocs returns an agent-readable `Page Not Found` response. It compares the requested path with visible page paths and titles, then links up to five likely matches with their descriptions. If no match is useful, the response links to `/llms.txt` instead.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Migrate from Geistdocs 1.x to 2.0
|
|
3
|
+
description: Upgrade imports, dependencies, and routing without copying Geistdocs internals
|
|
4
|
+
type: guide
|
|
5
|
+
summary: A concise, agent-friendly checklist for upgrading an existing Geistdocs 1.x site to 2.0.
|
|
6
|
+
url: /docs/migration-2
|
|
7
|
+
source: apps/template/content/docs/migration-2.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/migration
|
|
10
|
+
- /docs/configuration
|
|
11
|
+
- /docs/versioned-docs
|
|
12
|
+
- /docs/proxy
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Migrate from Geistdocs 1.x to 2.0
|
|
16
|
+
|
|
17
|
+
Use this guide only for a site already running Geistdocs 1.x. Geistdocs 2.0 moves shared UI primitives and assets to Geistcn; its package-backed page, source, search, chat, proxy, and agent-readable route APIs remain the preferred integration.
|
|
18
|
+
|
|
19
|
+
Upgrade this Geistdocs site from 1.x to 2.0. Inspect `package.json`, `next.config.ts`, `source.config.ts`, the root layout, `lib/geistdocs`, `proxy.ts`, and all imports from `@vercel/geistdocs/components` or `@vercel/geistdocs/assets`. Upgrade the dependencies, replace removed generic component imports with Geistcn, keep Geistdocs-specific components and route adapters package-backed, and verify every public surface. Do not copy package internals into the app.
|
|
20
|
+
|
|
21
|
+
## 1. Upgrade dependencies
|
|
22
|
+
|
|
23
|
+
```bash title="Terminal"
|
|
24
|
+
pnpm add --save-exact @vercel/geistdocs@2 @vercel/geistcn@1.0.3 @vercel/geistcn-assets@2.0.1 next@16.3.3 react@19.2.3 react-dom@19.2.3
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Geistdocs requires Node.js 20.9 or later. If the app directly uses Ask AI dependencies, use AI SDK v6 and `@ai-sdk/react` v3. Migrate unrelated AI features separately instead of forking Geistdocs chat code.
|
|
28
|
+
|
|
29
|
+
## 2. Replace removed imports
|
|
30
|
+
|
|
31
|
+
| Geistdocs 1.x import | Geistdocs 2.0 replacement |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `badge`, `button`, `dialog`, `drawer`, `input`, `kbd`, `separator`, `sheet`, `spinner`, `textarea`, `theme-switcher`, or `tooltip` | Import the matching component from `@vercel/geistcn/components/<name>`. |
|
|
34
|
+
| `switch` | Use `@vercel/geistcn/components/toggle`. |
|
|
35
|
+
| `sonner` | Use `Toasts` and `useToasts` from `@vercel/geistcn/components/toasts`. |
|
|
36
|
+
| `theme-aware-image` | Use Geistcn `Image` with `srcLight` and `srcDark`. |
|
|
37
|
+
| `button-group`, `card`, or `input-group` | Choose a Geistcn component or keep an app-owned composition; there is no API-compatible replacement. |
|
|
38
|
+
| `@vercel/geistdocs/assets/icons` or `assets/icons/*` | `@vercel/geistcn-assets/icons` or `icons/*` |
|
|
39
|
+
| `@vercel/geistdocs/assets/logos` or `assets/logos/*` | `@vercel/geistcn-assets/logos` or `logos/*` |
|
|
40
|
+
|
|
41
|
+
Keep documentation-specific imports such as `callout`, `code-block`, `code-block-tabs`, `collapsible`, `command-prompt`, `copy-prompt`, `mermaid`, and `video` on `@vercel/geistdocs/components/*`.
|
|
42
|
+
|
|
43
|
+
Import the package stylesheet once and apply the Geist font classes at the root:
|
|
44
|
+
|
|
45
|
+
```tsx title="app/[lang]/layout.tsx"
|
|
46
|
+
import "@vercel/geistdocs/styles.css";
|
|
47
|
+
import { geistFontClasses } from "@vercel/geistcn/core";
|
|
48
|
+
|
|
49
|
+
export default function RootLayout({ children }: LayoutProps<"/[lang]">) {
|
|
50
|
+
return (
|
|
51
|
+
<html className={geistFontClasses}>
|
|
52
|
+
<body>{children}</body>
|
|
53
|
+
</html>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 3. Use the Next.js and source integrations
|
|
59
|
+
|
|
60
|
+
```ts title="next.config.ts"
|
|
61
|
+
import { createGeistdocs } from "@vercel/geistdocs/next";
|
|
62
|
+
import type { NextConfig } from "next";
|
|
63
|
+
|
|
64
|
+
const config: NextConfig = {
|
|
65
|
+
modularizeImports: {
|
|
66
|
+
"@vercel/geistcn/components": {
|
|
67
|
+
skipDefaultConversion: true,
|
|
68
|
+
transform: "@vercel/geistcn/components/{{ kebabCase member }}",
|
|
69
|
+
},
|
|
70
|
+
"@vercel/geistcn/core": {
|
|
71
|
+
skipDefaultConversion: true,
|
|
72
|
+
transform: "@vercel/geistcn/core",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
transpilePackages: [
|
|
76
|
+
"@vercel/geistcn",
|
|
77
|
+
"@vercel/geist-test-utils",
|
|
78
|
+
"@vercel/next-themes",
|
|
79
|
+
],
|
|
80
|
+
cacheComponents: true,
|
|
81
|
+
partialPrefetching: true,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export default createGeistdocs()(config);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
In `source.config.ts`, import `defineGeistdocsSourceConfig`, `geistdocsFrontmatterSchema`, and `geistdocsMetaSchema` only from `@vercel/geistdocs/source-config`. Keep pages and route handlers as thin adapters around Geistdocs package APIs.
|
|
88
|
+
|
|
89
|
+
## 4. Preserve routing invariants
|
|
90
|
+
|
|
91
|
+
- If Next.js uses `basePath`, set the same value in Geistdocs config.
|
|
92
|
+
- Keep `content.route`, source `baseUrl`, navigation hrefs, `getPageUrl`, search results, and proxy `markdownRoutes` app-local. Next.js adds the mount prefix once; Geistdocs adds it to public metadata, Markdown, discovery links, and citations.
|
|
93
|
+
- For versioned docs, use `createVersionedSources` and pass server-computed `collectVersionSwitchPaths` to the version selector so missing pages fall back to an existing ancestor.
|
|
94
|
+
- Keep version and router dimensions in static route segments when layouts and sidebar state should persist. Build router-specific, prefix-relative path sets separately from version paths.
|
|
95
|
+
- Keep product-specific navigation titles, badges, related links, and content transforms in the app.
|
|
96
|
+
|
|
97
|
+
## 5. Verify the upgrade
|
|
98
|
+
|
|
99
|
+
- Run install, typecheck, tests, and a production build.
|
|
100
|
+
- Open representative HTML pages and their `.md` equivalents, including a not-found path.
|
|
101
|
+
- Test search, Ask AI citations, proxy rewrites, and agent-readable routes.
|
|
102
|
+
- Switch versions from pages that do and do not exist in the target version.
|
|
103
|
+
- Confirm links do not trigger broad post-load prefetching and Ask AI is not eagerly loaded.
|
|
104
|
+
- Recheck LCP, CLS, accessibility, and post-render network and CPU activity.
|
|
105
|
+
|
|
106
|
+
For a first migration from Fumadocs or a custom docs site, follow the [full migration guide](/docs/migration).
|
package/docs/pages/migration.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Migrate to Geistdocs
|
|
3
3
|
description: Migrate a Fumadocs or custom Geist docs site to package-backed Geistdocs
|
|
4
4
|
type: guide
|
|
5
5
|
summary: Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
|
|
@@ -14,10 +14,13 @@ related:
|
|
|
14
14
|
- /docs/agent-readiness
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# Migrate to Geistdocs
|
|
18
18
|
|
|
19
19
|
Migrate an existing Fumadocs or custom Geist documentation site to `@vercel/geistdocs` by moving shared behavior into package APIs and keeping site-specific adapters local. The safest migration keeps content, routing decisions, and product-specific UI in your app while replacing copied runtime code with thin package-backed adapters.
|
|
20
20
|
|
|
21
|
+
> Note:
|
|
22
|
+
Follow the concise [1.x → 2.0 guide](/docs/migration-2) instead. This page is for adopting Geistdocs from Fumadocs or a custom documentation site.
|
|
23
|
+
|
|
21
24
|
Help me migrate this existing docs site to package-backed Geistdocs. Inspect `source.config.ts`, `lib/geistdocs/source.ts`, app route files, `proxy.ts` or `middleware.ts`, `public/llms.txt`, Open Graph routes, Tailwind CSS setup, `package.json` AI SDK dependencies, and environment variables. Then produce a step-by-step migration plan using `@vercel/geistdocs` package APIs without copying package internals.
|
|
22
25
|
|
|
23
26
|
## Before you migrate
|
package/docs/pages/syntax.md
CHANGED
|
@@ -87,6 +87,10 @@ Create ordered lists with numbers:
|
|
|
87
87
|
2. Second step
|
|
88
88
|
3. Third step
|
|
89
89
|
|
|
90
|
+
### Steps
|
|
91
|
+
|
|
92
|
+
Headings that start with a number, such as `### 1. Install the CLI`, render as a numbered step list with a counter beside each heading. See [Steps](/docs/components/steps) for the grouping rules and the `Steps` and `Step` components.
|
|
93
|
+
|
|
90
94
|
### Blockquotes
|
|
91
95
|
|
|
92
96
|
Use `>` to create blockquotes:
|
|
@@ -211,6 +215,44 @@ Add images with ``:
|
|
|
211
215
|

|
|
212
216
|
```
|
|
213
217
|
|
|
218
|
+
Use `<Image>` when an image needs the standard documentation presentation and
|
|
219
|
+
an optional description. It uses Geistcn's image component without a lightbox
|
|
220
|
+
or other interaction:
|
|
221
|
+
|
|
222
|
+
```mdx
|
|
223
|
+
<Image
|
|
224
|
+
alt="Deployment graph"
|
|
225
|
+
caption="Requests move from the edge to the selected region."
|
|
226
|
+
height={480}
|
|
227
|
+
src="/deployment-graph.png"
|
|
228
|
+
width={800}
|
|
229
|
+
/>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
This renders as:
|
|
233
|
+
|
|
234
|
+
<Image
|
|
235
|
+
alt="Navigation Inspector showing a loading shell for a page load"
|
|
236
|
+
caption="The Navigation Inspector paused on a page load."
|
|
237
|
+
height={389}
|
|
238
|
+
srcDark="https://h8DxKfmAPhn8O0p3.public.blob.vercel-storage.com/docs/dark/inspector-load.png"
|
|
239
|
+
srcLight="https://h8DxKfmAPhn8O0p3.public.blob.vercel-storage.com/docs/light/inspector-load.png"
|
|
240
|
+
width={472}
|
|
241
|
+
/>
|
|
242
|
+
|
|
243
|
+
For theme-aware images, provide both sources:
|
|
244
|
+
|
|
245
|
+
```mdx
|
|
246
|
+
<Image
|
|
247
|
+
alt="Deployment graph"
|
|
248
|
+
caption="Requests move from the edge to the selected region."
|
|
249
|
+
height={480}
|
|
250
|
+
srcDark="/deployment-graph-dark.png"
|
|
251
|
+
srcLight="/deployment-graph-light.png"
|
|
252
|
+
width={800}
|
|
253
|
+
/>
|
|
254
|
+
```
|
|
255
|
+
|
|
214
256
|
## GitHub Flavored Markdown
|
|
215
257
|
|
|
216
258
|
Geistdocs supports GFM extensions including tables, task lists, and autolinks.
|
package/docs/sitemap.md
CHANGED
|
@@ -6,8 +6,9 @@ Use it to choose focused page files from `docs/pages/` before reading the full `
|
|
|
6
6
|
- [Overview](pages/index.md) | URL: /docs | Type: overview | Summary: Geistdocs is a packaged documentation system for creating Next.js and Fumadocs sites with shared runtime features.
|
|
7
7
|
- [Getting Started](pages/getting-started.md) | URL: /docs/getting-started | Type: guide | Summary: Create a Geistdocs project, run it locally, and edit your first documentation page.
|
|
8
8
|
- [Environment Variables](pages/env.md) | URL: /docs/env | Type: reference | Summary: Environment variables required by Geistdocs for AI chat, proxy mode, and production URL configuration.
|
|
9
|
-
- [Deploy to Vercel](pages/deployment.md) | URL: /docs/deployment | Type: guide | Summary: Deploy
|
|
10
|
-
- [
|
|
9
|
+
- [Deploy to Vercel](pages/deployment.md) | URL: /docs/deployment | Type: guide | Summary: Deploy a Geistdocs site to Vercel with the required project settings, environment variables, and private-package access.
|
|
10
|
+
- [Migrate to Geistdocs](pages/migration.md) | URL: /docs/migration | Type: guide | Summary: Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
|
|
11
|
+
- [Migrate from Geistdocs 1.x to 2.0](pages/migration-2.md) | URL: /docs/migration-2 | Type: guide | Summary: A concise, agent-friendly checklist for upgrading an existing Geistdocs 1.x site to 2.0.
|
|
11
12
|
- [Configuration](pages/configuration.md) | URL: /docs/configuration | Type: reference | Summary: Configure site metadata, navigation, AI features, page actions, translations, and local adapters.
|
|
12
13
|
- [Syntax](pages/syntax.md) | URL: /docs/syntax | Type: reference | Summary: Supported MDX syntax including text formatting, code blocks, line highlighting, and Mermaid diagrams.
|
|
13
14
|
- [Geistdocs Provider](pages/provider.md) | URL: /docs/provider | Type: reference | Summary: The root provider component that wraps your application to handle toast notifications, search, and analytics.
|
|
@@ -23,4 +24,5 @@ Use it to choose focused page files from `docs/pages/` before reading the full `
|
|
|
23
24
|
- [llms.txt](pages/llms-txt.md) | URL: /docs/llms-txt | Type: conceptual | Summary: A single endpoint that returns all documentation as plain Markdown text following the llms.txt standard.
|
|
24
25
|
- [Open in Chat](pages/open-in-chat.md) | URL: /docs/open-in-chat | Type: conceptual | Summary: Transfer documentation context to AI chat platforms like ChatGPT, Claude, Cursor, and v0 with a single click.
|
|
25
26
|
- [RSS](pages/rss.md) | URL: /docs/rss | Type: conceptual | Summary: An automatically generated RSS 2.0 feed that keeps users informed when documentation is published or updated.
|
|
27
|
+
- [Steps](pages/components/steps.md) | URL: /docs/components/steps | Type: reference | Summary: Write consecutive headings that start with a number, such as "### 1. Install", to render a numbered step list. The Steps and Step components cover cases where a heading must be wrapped in another component.
|
|
26
28
|
- [Table of contents](pages/table-of-contents.md) | URL: /docs/table-of-contents | Type: reference | Summary: Geistdocs builds the "On this page" outline from your headings, indents sub-headings under their parent, and tracks the active section along a straight vertical guide rail.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/geistdocs",
|
|
3
3
|
"description": "Runtime and CLI for Geistdocs projects.",
|
|
4
|
-
"version": "1.25.1-canary.
|
|
4
|
+
"version": "1.25.1-canary.62250e6",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -155,6 +155,10 @@
|
|
|
155
155
|
"types": "./dist/components/copy-prompt.d.ts",
|
|
156
156
|
"default": "./dist/components/copy-prompt.js"
|
|
157
157
|
},
|
|
158
|
+
"./components/image": {
|
|
159
|
+
"types": "./dist/components/image.d.ts",
|
|
160
|
+
"default": "./dist/components/image.js"
|
|
161
|
+
},
|
|
158
162
|
"./components/dropdown-menu": {
|
|
159
163
|
"types": "./dist/components/dropdown-menu.d.ts",
|
|
160
164
|
"default": "./dist/components/dropdown-menu.js"
|
|
@@ -175,6 +179,10 @@
|
|
|
175
179
|
"types": "./dist/components/scroll-area.d.ts",
|
|
176
180
|
"default": "./dist/components/scroll-area.js"
|
|
177
181
|
},
|
|
182
|
+
"./components/steps": {
|
|
183
|
+
"types": "./dist/components/steps.d.ts",
|
|
184
|
+
"default": "./dist/components/steps.js"
|
|
185
|
+
},
|
|
178
186
|
"./components/video": {
|
|
179
187
|
"types": "./dist/components/video.d.ts",
|
|
180
188
|
"default": "./dist/components/video.js"
|
|
@@ -192,10 +200,7 @@
|
|
|
192
200
|
"@clack/prompts": "^0.11.0",
|
|
193
201
|
"@orama/tokenizers": "^3.1.16",
|
|
194
202
|
"@streamdown/cjk": "^1.0.1",
|
|
195
|
-
"@streamdown/code": "^1.0.1",
|
|
196
203
|
"@vercel/agent-readability": "^0.7.0",
|
|
197
|
-
"@vercel/geistcn": "1.0.3",
|
|
198
|
-
"@vercel/geistcn-assets": "2.0.1",
|
|
199
204
|
"@vercel/oidc": "^3.4.1",
|
|
200
205
|
"ai": "^6.0.132",
|
|
201
206
|
"class-variance-authority": "^0.7.1",
|
|
@@ -216,6 +221,7 @@
|
|
|
216
221
|
"remark-gfm": "^4.0.1",
|
|
217
222
|
"remark-mdx": "^3.1.1",
|
|
218
223
|
"remark-parse": "^11.0.0",
|
|
224
|
+
"remark-stringify": "^11.0.0",
|
|
219
225
|
"streamdown": "^2.1.0",
|
|
220
226
|
"ts-morph": "^27.0.2",
|
|
221
227
|
"tw-animate-css": "^1.4.0",
|
|
@@ -225,6 +231,8 @@
|
|
|
225
231
|
"zod": "^4.1.13"
|
|
226
232
|
},
|
|
227
233
|
"peerDependencies": {
|
|
234
|
+
"@vercel/geistcn": "^1.0.4",
|
|
235
|
+
"@vercel/geistcn-assets": "^2.1.0",
|
|
228
236
|
"next": "^16.3.3",
|
|
229
237
|
"react": "^19.2.3",
|
|
230
238
|
"react-dom": "^19.2.3",
|
|
@@ -232,6 +240,8 @@
|
|
|
232
240
|
},
|
|
233
241
|
"devDependencies": {
|
|
234
242
|
"@biomejs/biome": "^2.3.8",
|
|
243
|
+
"@vercel/geistcn": "1.0.4",
|
|
244
|
+
"@vercel/geistcn-assets": "2.1.0",
|
|
235
245
|
"@types/glob": "^9.0.0",
|
|
236
246
|
"@types/mdast": "^4.0.4",
|
|
237
247
|
"@types/mdx": "^2.0.13",
|