@vercel/geistdocs 2.16.0 → 3.0.1-canary.85002c3

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.
Files changed (59) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/config.d.ts +12 -0
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/internal/lazy-mdx-components.d.ts +0 -2
  5. package/dist/internal/lazy-mdx-components.d.ts.map +1 -1
  6. package/dist/internal/lazy-mdx-components.js +0 -1
  7. package/dist/internal/mermaid-source.d.ts +5 -0
  8. package/dist/internal/mermaid-source.d.ts.map +1 -0
  9. package/dist/internal/mermaid-source.js +5 -0
  10. package/dist/internal/page-action-options.d.ts +9 -4
  11. package/dist/internal/page-action-options.d.ts.map +1 -1
  12. package/dist/internal/page-action-options.js +19 -12
  13. package/dist/internal/page-actions-client.d.ts.map +1 -1
  14. package/dist/internal/page-actions-client.js +19 -112
  15. package/dist/internal/page-actions-gate.d.ts +6 -0
  16. package/dist/internal/page-actions-gate.d.ts.map +1 -1
  17. package/dist/internal/page-actions-gate.js +11 -9
  18. package/dist/internal/page-actions-menu-client.d.ts +8 -0
  19. package/dist/internal/page-actions-menu-client.d.ts.map +1 -0
  20. package/dist/internal/page-actions-menu-client.js +105 -0
  21. package/dist/internal/page-markdown.d.ts +3 -0
  22. package/dist/internal/page-markdown.d.ts.map +1 -0
  23. package/dist/internal/page-markdown.js +45 -0
  24. package/dist/internal/sidebar.d.ts.map +1 -1
  25. package/dist/internal/sidebar.js +4 -1
  26. package/dist/internal/toc-actions-client.d.ts +3 -1
  27. package/dist/internal/toc-actions-client.d.ts.map +1 -1
  28. package/dist/internal/toc-actions-client.js +7 -9
  29. package/dist/mdx.js +3 -2
  30. package/dist/pages/docs.d.ts +6 -1
  31. package/dist/pages/docs.d.ts.map +1 -1
  32. package/dist/pages/docs.js +11 -6
  33. package/docs/agents.md +2 -3
  34. package/docs/llms.txt +31 -180
  35. package/docs/manifest.json +2 -11
  36. package/docs/pages/changelog.md +1 -1
  37. package/docs/pages/components/index.md +0 -1
  38. package/docs/pages/configuration.md +24 -3
  39. package/docs/pages/edit-on-github.md +1 -1
  40. package/docs/pages/index.md +0 -29
  41. package/docs/pages/md.md +1 -1
  42. package/docs/pages/migration.md +1 -1
  43. package/docs/pages/syntax.md +1 -107
  44. package/docs/sitemap.md +1 -2
  45. package/package.json +12 -6
  46. package/template/app/[lang]/docs/[[...slug]]/page.tsx +1 -0
  47. package/template/content/docs/changelog.mdx +1 -1
  48. package/template/content/docs/components/index.mdx +0 -1
  49. package/template/content/docs/components/meta.json +0 -1
  50. package/template/content/docs/configuration.mdx +24 -3
  51. package/template/content/docs/edit-on-github.mdx +1 -1
  52. package/template/content/docs/index.mdx +0 -28
  53. package/template/content/docs/md.mdx +1 -1
  54. package/template/content/docs/migration.mdx +1 -1
  55. package/template/content/docs/syntax.cn.mdx +1 -107
  56. package/template/content/docs/syntax.mdx +1 -107
  57. package/template/package.json +1 -2
  58. package/docs/pages/components/mermaid.md +0 -29
  59. package/template/content/docs/components/mermaid.mdx +0 -25
package/docs/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Geistdocs Package Documentation
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 2.16.0.
3
+ These docs are bundled with `@vercel/geistdocs` 3.0.1-canary.85002c3.
4
4
  They describe how to build package-backed Geistdocs sites and how to use the package APIs from generated project adapters.
5
5
 
6
6
  ## Documentation Index
@@ -12,7 +12,7 @@ They describe how to build package-backed Geistdocs sites and how to use the pac
12
12
  - [Migrate to Geistdocs](pages/migration.md): Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
13
13
  - [Choose a Geistdocs package](pages/packages.md): Use the public package by default and the private package only where restricted Vercel npm dependencies are already available.
14
14
  - [Configuration](pages/configuration.md): Configure site metadata, navigation, AI features, page actions, translations, and local adapters.
15
- - [MDX Components](pages/syntax.md): MDX component and authoring reference covering tabs, text formatting, code blocks, line highlighting, and Mermaid diagrams.
15
+ - [MDX Components](pages/syntax.md): MDX component and authoring reference covering tabs, text formatting, code blocks, and line highlighting.
16
16
  - [Geistdocs Provider](pages/provider.md): The root provider component that wraps your application to handle toast notifications, search, and analytics.
17
17
  - [Versioned docs](pages/versioned-docs.md): Use createVersionedSources to configure stable, pre-release, or host-based documentation versions.
18
18
  - [Proxy and markdown routes](pages/proxy.md): Configure createProxy with generated route discovery, request hooks, markdown mappings, and a static Next.js matcher.
@@ -39,7 +39,6 @@ They describe how to build package-backed Geistdocs sites and how to use the pac
39
39
  - [Input](pages/components/input.md): Use Input for text entry in custom documentation and application interfaces.
40
40
  - [Internationalization](pages/internationalization.md): Serve documentation in multiple languages with automatic translation via the Geistdocs CLI and Fumadocs routing.
41
41
  - [llms.txt](pages/llms-txt.md): A single endpoint that returns all documentation as plain Markdown text following the llms.txt standard.
42
- - [Mermaid](pages/components/mermaid.md): Use Mermaid directly when diagram source is assembled outside an MDX Mermaid fence.
43
42
  - [Native Link](pages/components/link.md): Use NativeDocsLink where Next.js client navigation is not appropriate.
44
43
  - [Navigation Menu](pages/components/navigation-menu.md): Compose NavigationMenu primitives for custom product and documentation navigation.
45
44
  - [Open in Chat](pages/open-in-chat.md): Transfer documentation context to AI chat platforms like ChatGPT, Claude, Cursor, and v0 with a single click.
@@ -86,35 +85,6 @@ Geistdocs has three main parts:
86
85
  - Local adapter files: The files in your generated project that connect your configuration, content source, routes, and UI customization to the package.
87
86
  - Platform services: Hosted endpoints at `geistdocs.com` for optional translation, feedback, and markdown tracking features.
88
87
 
89
- ```mermaid
90
- flowchart TB
91
- subgraph Package["@vercel/geistdocs package"]
92
- cli["CLI: init, update, translate, search sync"]
93
- runtime["Runtime: layout, routes, MDX, controls"]
94
- bundledTemplate["Bundled template snapshot"]
95
- end
96
-
97
- subgraph Site["Generated docs site"]
98
- config["geistdocs.tsx"]
99
- adapters["app/, components/geistdocs/, lib/geistdocs/"]
100
- content["content/docs/*.mdx"]
101
- end
102
-
103
- subgraph Platform["Geistdocs platform"]
104
- translate["/translate"]
105
- feedback["/feedback"]
106
- tracking["/md-tracking"]
107
- end
108
-
109
- cli --> bundledTemplate
110
- bundledTemplate --> Site
111
- adapters --> runtime
112
- content --> adapters
113
- cli --> translate
114
- runtime --> feedback
115
- runtime --> tracking
116
- ```
117
-
118
88
  ## What you edit
119
89
 
120
90
  Most projects start by editing these files:
@@ -628,7 +598,7 @@ Replace imports according to this table:
628
598
  | `assets/icons`, `assets/icons/*`, `assets/logos`, or `assets/logos/*` | Keep the import package-backed. Both Geistdocs package variants expose the index and deep asset subpaths. |
629
599
  | `components/button-group`, `components/card`, or `components/input-group` | Use an appropriate Geistcn component or keep an application-owned composition. There is no direct Geistcn replacement with the same API. |
630
600
 
631
- Keep documentation-specific composites such as `Callout`, `CodeBlock`, `CodeBlockTabs`, `CommandPrompt`, `CopyPrompt`, and `Mermaid` imported from `@vercel/geistdocs/components/*`.
601
+ Keep documentation-specific composites such as `Callout`, `CodeBlock`, `CodeBlockTabs`, `CommandPrompt`, and `CopyPrompt` imported from `@vercel/geistdocs/components/*`.
632
602
 
633
603
  ## Configure Next.js
634
604
 
@@ -1481,17 +1451,17 @@ For example, a root-mounted source with `baseUrl: "/"` still uses `page.url ===
1481
1451
 
1482
1452
  ## Page actions
1483
1453
 
1484
- Content actions appear in the **Copy page** menu beside the page title. **Scroll to top** and **Give feedback** remain below the table of contents so they stay available while you read. These actions are enabled by default and can be disabled through `defineConfig` in `lib/geistdocs/config.tsx`:
1454
+ An icon-only **Copy page** button sits beside the page title. **Give feedback** and **Edit this page on GitHub** sit below the table of contents so they stay available while you read. On mobile, an inline row below the title offers Copy, View Markdown, and Ask AI. These actions are enabled by default and can be disabled through `defineConfig` in `lib/geistdocs/config.tsx`:
1485
1455
 
1486
1456
  ```tsx title="lib/geistdocs/config.tsx"
1487
1457
  export const config = defineConfig({
1488
1458
  // ...
1489
1459
  pageActions: {
1490
1460
  editSource: false,
1491
- scrollTop: true,
1492
1461
  copyPage: true,
1493
1462
  askAI: true,
1494
- openInChat: false,
1463
+ menu: false,
1464
+ openInChat: true,
1495
1465
  },
1496
1466
  feedback: {
1497
1467
  enabled: false,
@@ -1499,6 +1469,8 @@ export const config = defineConfig({
1499
1469
  });
1500
1470
  ```
1501
1471
 
1472
+ Set `menu: true` to add an actions dropdown beside **Copy page** on desktop, with View as Markdown, Open in v0 and other chats, and Ask AI. The menu is off by default, so sites that don't opt in never download its code. `openInChat` only applies to the menu. Edit on GitHub stays below the table of contents either way.
1473
+
1502
1474
  `github.editPath` controls the file path used by the "Edit this page on GitHub" action. Use `{path}` where the page path should be inserted. For monorepos, include the app directory, such as `apps/docs/content/docs/{path}`.
1503
1475
 
1504
1476
  ## Page visibility
@@ -1645,6 +1617,25 @@ const docsPage = createDocsPage({
1645
1617
  });
1646
1618
  ```
1647
1619
 
1620
+ ### Markdown in custom page headers
1621
+
1622
+ By default, `renderTop` receives the full page Markdown. If the hook only reads page data, opt out of that conversion:
1623
+
1624
+ ```tsx title="app/[lang]/docs/[[...slug]]/page.tsx"
1625
+ const docsPage = createDocsPage({
1626
+ config,
1627
+ source: geistdocsSource,
1628
+ renderTopMarkdown: false,
1629
+ renderTop: ({ data }) => <MobileDocsBar toc={data.toc} />,
1630
+ });
1631
+ ```
1632
+
1633
+ `renderTopMarkdown` defaults to `true` for backward compatibility. Setting it to `false` passes `markdown: ""` to `renderTop`, unless `pageActions.getExtraActions` also needs Markdown; in that case both hooks receive the full Markdown. Leave the default when your header reads `markdown`.
1634
+
1635
+ Both package variants support this option. Newly generated sites opt out for their TOC-only header. Existing consumers can add `renderTopMarkdown: false` to their local `createDocsPage` call after confirming that `renderTop` does not use Markdown. Updating the package does not overwrite local adapters. This option does not change per-page Markdown routes, `llms.txt`, search exports, or metadata.
1636
+
1637
+ ### Page URLs and metadata
1638
+
1648
1639
  Use `getPageUrl` when the app-local route differs from the source URL, such as `/v5/docs`. Geistdocs keeps that value app-local for previous and next navigation, then derives the public action URL with `config.basePath`.
1649
1640
 
1650
1641
  For unusual deployments, `getPublicPageUrl` can override the public HTML URL and `getMarkdownUrl` can override the Copy Page, View as Markdown, and metadata URL. Most sites should use the package defaults so these surfaces cannot drift apart.
@@ -1674,7 +1665,7 @@ If a release adds an optional prop or config field, opt into it by editing the r
1674
1665
  title: MDX Components
1675
1666
  description: Author MDX content with supported components, Markdown syntax, and formatting options
1676
1667
  type: reference
1677
- summary: MDX component and authoring reference covering tabs, text formatting, code blocks, line highlighting, and Mermaid diagrams.
1668
+ summary: MDX component and authoring reference covering tabs, text formatting, code blocks, and line highlighting.
1678
1669
  url: /docs/syntax
1679
1670
  source: apps/template/content/docs/syntax.mdx
1680
1671
  prerequisites:
@@ -2385,112 +2376,6 @@ const sum = numbers.reduce((a, b) => a + b, 0); // [!code focus]
2385
2376
  console.log(sum);
2386
2377
  ```
2387
2378
 
2388
- ## Mermaid Diagrams
2389
-
2390
- Create diagrams and flowcharts using Mermaid syntax.
2391
-
2392
- ### Flowcharts
2393
-
2394
- ````md
2395
- ```mermaid
2396
- graph TD;
2397
- A[Start] --> B{Is it working?};
2398
- B -->|Yes| C[Great!];
2399
- B -->|No| D[Debug];
2400
- D --> B;
2401
- ```
2402
- ````
2403
-
2404
- This renders as:
2405
-
2406
- ```mermaid
2407
- graph TD;
2408
- A[Start] --> B{Is it working?};
2409
- B -->|Yes| C[Great!];
2410
- B -->|No| D[Debug];
2411
- D --> B;
2412
- ```
2413
-
2414
- ### Sequence Diagrams
2415
-
2416
- ````md
2417
- ```mermaid
2418
- sequenceDiagram
2419
- participant User
2420
- participant API
2421
- participant Database
2422
- User->>API: Request data
2423
- API->>Database: Query
2424
- Database-->>API: Results
2425
- API-->>User: Response
2426
- ```
2427
- ````
2428
-
2429
- This renders as:
2430
-
2431
- ```mermaid
2432
- sequenceDiagram
2433
- participant User
2434
- participant API
2435
- participant Database
2436
- User->>API: Request data
2437
- API->>Database: Query
2438
- Database-->>API: Results
2439
- API-->>User: Response
2440
- ```
2441
-
2442
- ### Architecture Diagrams
2443
-
2444
- ````md
2445
- ```mermaid
2446
- graph TD;
2447
- subgraph Frontend
2448
- A[Web App]
2449
- B[Mobile App]
2450
- end
2451
- subgraph Backend
2452
- C[API Gateway]
2453
- D[Auth Service]
2454
- E[Data Service]
2455
- end
2456
- subgraph Storage
2457
- F[(Database)]
2458
- G[(Cache)]
2459
- end
2460
- A --> C
2461
- B --> C
2462
- C --> D
2463
- C --> E
2464
- E --> F
2465
- E --> G
2466
- ```
2467
- ````
2468
-
2469
- This renders as:
2470
-
2471
- ```mermaid
2472
- graph TD;
2473
- subgraph Frontend
2474
- A[Web App]
2475
- B[Mobile App]
2476
- end
2477
- subgraph Backend
2478
- C[API Gateway]
2479
- D[Auth Service]
2480
- E[Data Service]
2481
- end
2482
- subgraph Storage
2483
- F[(Database)]
2484
- G[(Cache)]
2485
- end
2486
- A --> C
2487
- B --> C
2488
- C --> D
2489
- C --> E
2490
- E --> F
2491
- E --> G
2492
- ```
2493
-
2494
2379
 
2495
2380
  ---
2496
2381
 
@@ -3284,7 +3169,7 @@ export default changelogPage.Page;
3284
3169
 
3285
3170
  The root adapter uses `Page`, `generateMetadata`, and `generateStaticParams`. The page includes its own `<main>` element, so render it without another main wrapper. Without `getLang`, the helper reads `params.lang`; apps using root parameters should pass their server-side language getter.
3286
3171
 
3287
- `config` and `source` are required. `path` defaults to `/changelog`, `title` to `Changelog`, and `description` to `The latest releases, improvements, and fixes.` Set `pageSize` in the shared options; it defaults to `10` and accepts integers from `1` to `100`. Set `markdownPath` only when both Markdown adapters are installed. It enables the shared **Copy page** control, including **View as Markdown**, and alternate metadata; it does not create an endpoint. These actions use the current numbered page's Markdown endpoint and honor `config.pageActions`, matching the docs controls.
3172
+ `config` and `source` are required. `path` defaults to `/changelog`, `title` to `Changelog`, and `description` to `The latest releases, improvements, and fixes.` Set `pageSize` in the shared options; it defaults to `10` and accepts integers from `1` to `100`. Set `markdownPath` only when both Markdown adapters are installed. It enables the shared **Copy page** control (plus **View Markdown** in the mobile row) and alternate metadata; it does not create an endpoint. These actions use the current numbered page's Markdown endpoint and honor `config.pageActions`, matching the docs controls.
3288
3173
 
3289
3174
  Keep `path`, `markdownPath`, and `dataPath` app-local, without a locale or deployment `basePath`. Geistdocs adds those prefixes when generating public links and canonical URLs; it does not strip prefixes you supply. Set `config.siteUrl` for absolute canonical URLs.
3290
3175
 
@@ -3629,7 +3514,7 @@ The `.mdx` version returns:
3629
3514
 
3630
3515
  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`.
3631
3516
 
3632
- Copy Page, View as Markdown, and the `text/markdown` metadata alternate all use the same package resolver. View as Markdown opens the resolved `.md` URL in a new tab from a button, which keeps the URL shareable without adding an anchor to the page. Use `createDocsPage({ getMarkdownUrl })` only when the deployment needs a different public contract.
3517
+ Copy Page, View Markdown, and the `text/markdown` metadata alternate all use the same package resolver. View Markdown, in the mobile page actions row, opens the resolved `.md` URL in a new tab from a button, which keeps the URL shareable without adding an anchor to the page. Use `createDocsPage({ getMarkdownUrl })` only when the deployment needs a different public contract.
3633
3518
 
3634
3519
  ## Use cases
3635
3520
 
@@ -5108,7 +4993,6 @@ Internal projects using `@vercel/geistdocs-private` use the same component subpa
5108
4993
  | [Image](/docs/components/image) | `components/image` | Next.js images with optional light and dark sources |
5109
4994
  | [Input](/docs/components/input) | `components/input` | Text input fields with provider-backed styling |
5110
4995
  | [Native Link](/docs/components/link) | `components/link` | Styled anchors using browser-native navigation |
5111
- | [Mermaid](/docs/components/mermaid) | `components/mermaid` | Mermaid diagram rendering |
5112
4996
  | [Navigation Menu](/docs/components/navigation-menu) | `components/navigation-menu` | Accessible navigation flyouts |
5113
4997
  | [Popover](/docs/components/popover) | `components/popover` | Anchored floating content |
5114
4998
  | [Scroll Area](/docs/components/scroll-area) | `components/scroll-area` | Styled overflow regions and scrollbars |
@@ -5573,7 +5457,7 @@ related:
5573
5457
 
5574
5458
  # Edit on GitHub
5575
5459
 
5576
- The "Edit on GitHub" feature gives readers a direct link to propose documentation changes. This link appears in the table of contents sidebar on every documentation page.
5460
+ The "Edit on GitHub" feature gives readers a direct link to propose documentation changes. This link appears below the table of contents, next to **Give feedback**, on every documentation page that has a table of contents.
5577
5461
 
5578
5462
  Help me configure Edit on GitHub for this Geistdocs site. Check the `github` owner and repo in `geistdocs.tsx`, verify the generated edit URL for this page, and tell me how to disable the action if needed.
5579
5463
 
@@ -6164,39 +6048,6 @@ The llms.txt standard is a simple convention that makes documentation more acces
6164
6048
  Learn more at [llmstxt.org](https://llmstxt.org/)
6165
6049
 
6166
6050
 
6167
- ---
6168
-
6169
- ---
6170
- title: Mermaid
6171
- description: Render Mermaid diagrams from chart source
6172
- type: reference
6173
- summary: Use Mermaid directly when diagram source is assembled outside an MDX Mermaid fence.
6174
- url: /docs/components/mermaid
6175
- source: apps/template/content/docs/components/mermaid.mdx
6176
- related:
6177
- - /docs/components
6178
- - /docs/syntax
6179
- ---
6180
-
6181
- # Mermaid
6182
-
6183
- import { Mermaid } from "@vercel/geistdocs/components/mermaid";
6184
-
6185
- <div className="not-prose my-6 rounded-lg border border-gray-400 bg-background-100 p-6">
6186
- <Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />
6187
- </div>
6188
-
6189
- ```tsx
6190
- import { Mermaid } from "@vercel/geistdocs/components/mermaid";
6191
-
6192
- export function Flow() {
6193
- return <Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />;
6194
- }
6195
- ```
6196
-
6197
- Mermaid code fences render this component automatically in authored MDX.
6198
-
6199
-
6200
6051
  ---
6201
6052
 
6202
6053
  ---
@@ -75,7 +75,7 @@
75
75
  "description": "Author MDX content with supported components, Markdown syntax, and formatting options",
76
76
  "path": "pages/syntax.md",
77
77
  "source": "apps/template/content/docs/syntax.mdx",
78
- "summary": "MDX component and authoring reference covering tabs, text formatting, code blocks, line highlighting, and Mermaid diagrams.",
78
+ "summary": "MDX component and authoring reference covering tabs, text formatting, code blocks, and line highlighting.",
79
79
  "title": "MDX Components",
80
80
  "type": "reference",
81
81
  "url": "/docs/syntax"
@@ -314,15 +314,6 @@
314
314
  "type": "conceptual",
315
315
  "url": "/docs/llms-txt"
316
316
  },
317
- {
318
- "description": "Render Mermaid diagrams from chart source",
319
- "path": "pages/components/mermaid.md",
320
- "source": "apps/template/content/docs/components/mermaid.mdx",
321
- "summary": "Use Mermaid directly when diagram source is assembled outside an MDX Mermaid fence.",
322
- "title": "Mermaid",
323
- "type": "reference",
324
- "url": "/docs/components/mermaid"
325
- },
326
317
  {
327
318
  "description": "Render styled anchors with browser-native navigation",
328
319
  "path": "pages/components/link.md",
@@ -467,5 +458,5 @@
467
458
  }
468
459
  ],
469
460
  "source": "apps/template/content/docs",
470
- "version": "2.16.0"
461
+ "version": "3.0.1-canary.85002c3"
471
462
  }
@@ -83,7 +83,7 @@ export default changelogPage.Page;
83
83
 
84
84
  The root adapter uses `Page`, `generateMetadata`, and `generateStaticParams`. The page includes its own `<main>` element, so render it without another main wrapper. Without `getLang`, the helper reads `params.lang`; apps using root parameters should pass their server-side language getter.
85
85
 
86
- `config` and `source` are required. `path` defaults to `/changelog`, `title` to `Changelog`, and `description` to `The latest releases, improvements, and fixes.` Set `pageSize` in the shared options; it defaults to `10` and accepts integers from `1` to `100`. Set `markdownPath` only when both Markdown adapters are installed. It enables the shared **Copy page** control, including **View as Markdown**, and alternate metadata; it does not create an endpoint. These actions use the current numbered page's Markdown endpoint and honor `config.pageActions`, matching the docs controls.
86
+ `config` and `source` are required. `path` defaults to `/changelog`, `title` to `Changelog`, and `description` to `The latest releases, improvements, and fixes.` Set `pageSize` in the shared options; it defaults to `10` and accepts integers from `1` to `100`. Set `markdownPath` only when both Markdown adapters are installed. It enables the shared **Copy page** control (plus **View Markdown** in the mobile row) and alternate metadata; it does not create an endpoint. These actions use the current numbered page's Markdown endpoint and honor `config.pageActions`, matching the docs controls.
87
87
 
88
88
  Keep `path`, `markdownPath`, and `dataPath` app-local, without a locale or deployment `basePath`. Geistdocs adds those prefixes when generating public links and canonical URLs; it does not strip prefixes you supply. Set `config.siteUrl` for absolute canonical URLs.
89
89
 
@@ -35,7 +35,6 @@ Internal projects using `@vercel/geistdocs-private` use the same component subpa
35
35
  | [Image](/docs/components/image) | `components/image` | Next.js images with optional light and dark sources |
36
36
  | [Input](/docs/components/input) | `components/input` | Text input fields with provider-backed styling |
37
37
  | [Native Link](/docs/components/link) | `components/link` | Styled anchors using browser-native navigation |
38
- | [Mermaid](/docs/components/mermaid) | `components/mermaid` | Mermaid diagram rendering |
39
38
  | [Navigation Menu](/docs/components/navigation-menu) | `components/navigation-menu` | Accessible navigation flyouts |
40
39
  | [Popover](/docs/components/popover) | `components/popover` | Anchored floating content |
41
40
  | [Scroll Area](/docs/components/scroll-area) | `components/scroll-area` | Styled overflow regions and scrollbars |
@@ -342,17 +342,17 @@ For example, a root-mounted source with `baseUrl: "/"` still uses `page.url ===
342
342
 
343
343
  ## Page actions
344
344
 
345
- Content actions appear in the **Copy page** menu beside the page title. **Scroll to top** and **Give feedback** remain below the table of contents so they stay available while you read. These actions are enabled by default and can be disabled through `defineConfig` in `lib/geistdocs/config.tsx`:
345
+ An icon-only **Copy page** button sits beside the page title. **Give feedback** and **Edit this page on GitHub** sit below the table of contents so they stay available while you read. On mobile, an inline row below the title offers Copy, View Markdown, and Ask AI. These actions are enabled by default and can be disabled through `defineConfig` in `lib/geistdocs/config.tsx`:
346
346
 
347
347
  ```tsx title="lib/geistdocs/config.tsx"
348
348
  export const config = defineConfig({
349
349
  // ...
350
350
  pageActions: {
351
351
  editSource: false,
352
- scrollTop: true,
353
352
  copyPage: true,
354
353
  askAI: true,
355
- openInChat: false,
354
+ menu: false,
355
+ openInChat: true,
356
356
  },
357
357
  feedback: {
358
358
  enabled: false,
@@ -360,6 +360,8 @@ export const config = defineConfig({
360
360
  });
361
361
  ```
362
362
 
363
+ Set `menu: true` to add an actions dropdown beside **Copy page** on desktop, with View as Markdown, Open in v0 and other chats, and Ask AI. The menu is off by default, so sites that don't opt in never download its code. `openInChat` only applies to the menu. Edit on GitHub stays below the table of contents either way.
364
+
363
365
  `github.editPath` controls the file path used by the "Edit this page on GitHub" action. Use `{path}` where the page path should be inserted. For monorepos, include the app directory, such as `apps/docs/content/docs/{path}`.
364
366
 
365
367
  ## Page visibility
@@ -506,6 +508,25 @@ const docsPage = createDocsPage({
506
508
  });
507
509
  ```
508
510
 
511
+ ### Markdown in custom page headers
512
+
513
+ By default, `renderTop` receives the full page Markdown. If the hook only reads page data, opt out of that conversion:
514
+
515
+ ```tsx title="app/[lang]/docs/[[...slug]]/page.tsx"
516
+ const docsPage = createDocsPage({
517
+ config,
518
+ source: geistdocsSource,
519
+ renderTopMarkdown: false,
520
+ renderTop: ({ data }) => <MobileDocsBar toc={data.toc} />,
521
+ });
522
+ ```
523
+
524
+ `renderTopMarkdown` defaults to `true` for backward compatibility. Setting it to `false` passes `markdown: ""` to `renderTop`, unless `pageActions.getExtraActions` also needs Markdown; in that case both hooks receive the full Markdown. Leave the default when your header reads `markdown`.
525
+
526
+ Both package variants support this option. Newly generated sites opt out for their TOC-only header. Existing consumers can add `renderTopMarkdown: false` to their local `createDocsPage` call after confirming that `renderTop` does not use Markdown. Updating the package does not overwrite local adapters. This option does not change per-page Markdown routes, `llms.txt`, search exports, or metadata.
527
+
528
+ ### Page URLs and metadata
529
+
509
530
  Use `getPageUrl` when the app-local route differs from the source URL, such as `/v5/docs`. Geistdocs keeps that value app-local for previous and next navigation, then derives the public action URL with `config.basePath`.
510
531
 
511
532
  For unusual deployments, `getPublicPageUrl` can override the public HTML URL and `getMarkdownUrl` can override the Copy Page, View as Markdown, and metadata URL. Most sites should use the package defaults so these surfaces cannot drift apart.
@@ -11,7 +11,7 @@ related:
11
11
 
12
12
  # Edit on GitHub
13
13
 
14
- The "Edit on GitHub" feature gives readers a direct link to propose documentation changes. This link appears in the table of contents sidebar on every documentation page.
14
+ The "Edit on GitHub" feature gives readers a direct link to propose documentation changes. This link appears below the table of contents, next to **Give feedback**, on every documentation page that has a table of contents.
15
15
 
16
16
  Help me configure Edit on GitHub for this Geistdocs site. Check the `github` owner and repo in `geistdocs.tsx`, verify the generated edit URL for this page, and tell me how to disable the action if needed.
17
17
 
@@ -25,35 +25,6 @@ Geistdocs has three main parts:
25
25
  - Local adapter files: The files in your generated project that connect your configuration, content source, routes, and UI customization to the package.
26
26
  - Platform services: Hosted endpoints at `geistdocs.com` for optional translation, feedback, and markdown tracking features.
27
27
 
28
- ```mermaid
29
- flowchart TB
30
- subgraph Package["@vercel/geistdocs package"]
31
- cli["CLI: init, update, translate, search sync"]
32
- runtime["Runtime: layout, routes, MDX, controls"]
33
- bundledTemplate["Bundled template snapshot"]
34
- end
35
-
36
- subgraph Site["Generated docs site"]
37
- config["geistdocs.tsx"]
38
- adapters["app/, components/geistdocs/, lib/geistdocs/"]
39
- content["content/docs/*.mdx"]
40
- end
41
-
42
- subgraph Platform["Geistdocs platform"]
43
- translate["/translate"]
44
- feedback["/feedback"]
45
- tracking["/md-tracking"]
46
- end
47
-
48
- cli --> bundledTemplate
49
- bundledTemplate --> Site
50
- adapters --> runtime
51
- content --> adapters
52
- cli --> translate
53
- runtime --> feedback
54
- runtime --> tracking
55
- ```
56
-
57
28
  ## What you edit
58
29
 
59
30
  Most projects start by editing these files:
package/docs/pages/md.md CHANGED
@@ -39,7 +39,7 @@ The `.mdx` version returns:
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`.
41
41
 
42
- Copy Page, View as Markdown, and the `text/markdown` metadata alternate all use the same package resolver. View as Markdown opens the resolved `.md` URL in a new tab from a button, which keeps the URL shareable without adding an anchor to the page. Use `createDocsPage({ getMarkdownUrl })` only when the deployment needs a different public contract.
42
+ Copy Page, View Markdown, and the `text/markdown` metadata alternate all use the same package resolver. View Markdown, in the mobile page actions row, opens the resolved `.md` URL in a new tab from a button, which keeps the URL shareable without adding an anchor to the page. Use `createDocsPage({ getMarkdownUrl })` only when the deployment needs a different public contract.
43
43
 
44
44
  ## Use cases
45
45
 
@@ -119,7 +119,7 @@ Replace imports according to this table:
119
119
  | `assets/icons`, `assets/icons/*`, `assets/logos`, or `assets/logos/*` | Keep the import package-backed. Both Geistdocs package variants expose the index and deep asset subpaths. |
120
120
  | `components/button-group`, `components/card`, or `components/input-group` | Use an appropriate Geistcn component or keep an application-owned composition. There is no direct Geistcn replacement with the same API. |
121
121
 
122
- Keep documentation-specific composites such as `Callout`, `CodeBlock`, `CodeBlockTabs`, `CommandPrompt`, `CopyPrompt`, and `Mermaid` imported from `@vercel/geistdocs/components/*`.
122
+ Keep documentation-specific composites such as `Callout`, `CodeBlock`, `CodeBlockTabs`, `CommandPrompt`, and `CopyPrompt` imported from `@vercel/geistdocs/components/*`.
123
123
 
124
124
  ## Configure Next.js
125
125
 
@@ -2,7 +2,7 @@
2
2
  title: MDX Components
3
3
  description: Author MDX content with supported components, Markdown syntax, and formatting options
4
4
  type: reference
5
- summary: MDX component and authoring reference covering tabs, text formatting, code blocks, line highlighting, and Mermaid diagrams.
5
+ summary: MDX component and authoring reference covering tabs, text formatting, code blocks, and line highlighting.
6
6
  url: /docs/syntax
7
7
  source: apps/template/content/docs/syntax.mdx
8
8
  prerequisites:
@@ -712,109 +712,3 @@ const numbers = [1, 2, 3, 4, 5];
712
712
  const sum = numbers.reduce((a, b) => a + b, 0); // [!code focus]
713
713
  console.log(sum);
714
714
  ```
715
-
716
- ## Mermaid Diagrams
717
-
718
- Create diagrams and flowcharts using Mermaid syntax.
719
-
720
- ### Flowcharts
721
-
722
- ````md
723
- ```mermaid
724
- graph TD;
725
- A[Start] --> B{Is it working?};
726
- B -->|Yes| C[Great!];
727
- B -->|No| D[Debug];
728
- D --> B;
729
- ```
730
- ````
731
-
732
- This renders as:
733
-
734
- ```mermaid
735
- graph TD;
736
- A[Start] --> B{Is it working?};
737
- B -->|Yes| C[Great!];
738
- B -->|No| D[Debug];
739
- D --> B;
740
- ```
741
-
742
- ### Sequence Diagrams
743
-
744
- ````md
745
- ```mermaid
746
- sequenceDiagram
747
- participant User
748
- participant API
749
- participant Database
750
- User->>API: Request data
751
- API->>Database: Query
752
- Database-->>API: Results
753
- API-->>User: Response
754
- ```
755
- ````
756
-
757
- This renders as:
758
-
759
- ```mermaid
760
- sequenceDiagram
761
- participant User
762
- participant API
763
- participant Database
764
- User->>API: Request data
765
- API->>Database: Query
766
- Database-->>API: Results
767
- API-->>User: Response
768
- ```
769
-
770
- ### Architecture Diagrams
771
-
772
- ````md
773
- ```mermaid
774
- graph TD;
775
- subgraph Frontend
776
- A[Web App]
777
- B[Mobile App]
778
- end
779
- subgraph Backend
780
- C[API Gateway]
781
- D[Auth Service]
782
- E[Data Service]
783
- end
784
- subgraph Storage
785
- F[(Database)]
786
- G[(Cache)]
787
- end
788
- A --> C
789
- B --> C
790
- C --> D
791
- C --> E
792
- E --> F
793
- E --> G
794
- ```
795
- ````
796
-
797
- This renders as:
798
-
799
- ```mermaid
800
- graph TD;
801
- subgraph Frontend
802
- A[Web App]
803
- B[Mobile App]
804
- end
805
- subgraph Backend
806
- C[API Gateway]
807
- D[Auth Service]
808
- E[Data Service]
809
- end
810
- subgraph Storage
811
- F[(Database)]
812
- G[(Cache)]
813
- end
814
- A --> C
815
- B --> C
816
- C --> D
817
- C --> E
818
- E --> F
819
- E --> G
820
- ```
package/docs/sitemap.md CHANGED
@@ -10,7 +10,7 @@ Use it to choose focused page files from `docs/pages/` before reading the full `
10
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
11
  - [Choose a Geistdocs package](pages/packages.md) | URL: /docs/packages | Type: guide | Summary: Use the public package by default and the private package only where restricted Vercel npm dependencies are already available.
12
12
  - [Configuration](pages/configuration.md) | URL: /docs/configuration | Type: reference | Summary: Configure site metadata, navigation, AI features, page actions, translations, and local adapters.
13
- - [MDX Components](pages/syntax.md) | URL: /docs/syntax | Type: reference | Summary: MDX component and authoring reference covering tabs, text formatting, code blocks, line highlighting, and Mermaid diagrams.
13
+ - [MDX Components](pages/syntax.md) | URL: /docs/syntax | Type: reference | Summary: MDX component and authoring reference covering tabs, text formatting, code blocks, and line highlighting.
14
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.
15
15
  - [Versioned docs](pages/versioned-docs.md) | URL: /docs/versioned-docs | Type: guide | Summary: Use createVersionedSources to configure stable, pre-release, or host-based documentation versions.
16
16
  - [Proxy and markdown routes](pages/proxy.md) | URL: /docs/proxy | Type: reference | Summary: Configure createProxy with generated route discovery, request hooks, markdown mappings, and a static Next.js matcher.
@@ -37,7 +37,6 @@ Use it to choose focused page files from `docs/pages/` before reading the full `
37
37
  - [Input](pages/components/input.md) | URL: /docs/components/input | Type: reference | Summary: Use Input for text entry in custom documentation and application interfaces.
38
38
  - [Internationalization](pages/internationalization.md) | URL: /docs/internationalization | Type: guide | Summary: Serve documentation in multiple languages with automatic translation via the Geistdocs CLI and Fumadocs routing.
39
39
  - [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.
40
- - [Mermaid](pages/components/mermaid.md) | URL: /docs/components/mermaid | Type: reference | Summary: Use Mermaid directly when diagram source is assembled outside an MDX Mermaid fence.
41
40
  - [Native Link](pages/components/link.md) | URL: /docs/components/link | Type: reference | Summary: Use NativeDocsLink where Next.js client navigation is not appropriate.
42
41
  - [Navigation Menu](pages/components/navigation-menu.md) | URL: /docs/components/navigation-menu | Type: reference | Summary: Compose NavigationMenu primitives for custom product and documentation navigation.
43
42
  - [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.