doccupine 0.0.136 → 0.0.138

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 (60) hide show
  1. package/dist/index.js +27 -0
  2. package/dist/lib/layout.js +3 -1
  3. package/dist/lib/mdxToMarkdown.d.ts +1 -0
  4. package/dist/lib/mdxToMarkdown.js +134 -0
  5. package/dist/lib/structures.js +6 -0
  6. package/dist/templates/components/Chat.d.ts +1 -1
  7. package/dist/templates/components/Chat.js +2 -2
  8. package/dist/templates/components/Docs.d.ts +1 -1
  9. package/dist/templates/components/Docs.js +7 -2
  10. package/dist/templates/components/DocsSideBar.d.ts +1 -1
  11. package/dist/templates/components/DocsSideBar.js +1 -1
  12. package/dist/templates/components/MDXComponents.d.ts +1 -1
  13. package/dist/templates/components/MDXComponents.js +2 -0
  14. package/dist/templates/components/SideBar.d.ts +1 -1
  15. package/dist/templates/components/SideBar.js +5 -0
  16. package/dist/templates/components/layout/ActionBar.d.ts +1 -1
  17. package/dist/templates/components/layout/ActionBar.js +64 -31
  18. package/dist/templates/components/layout/Badge.d.ts +1 -1
  19. package/dist/templates/components/layout/Badge.js +16 -5
  20. package/dist/templates/components/layout/DocsComponents.d.ts +1 -1
  21. package/dist/templates/components/layout/DocsComponents.js +43 -2
  22. package/dist/templates/components/layout/DocsNavigation.d.ts +1 -1
  23. package/dist/templates/components/layout/DocsNavigation.js +8 -1
  24. package/dist/templates/components/layout/FocusModeToggle.d.ts +1 -0
  25. package/dist/templates/components/layout/FocusModeToggle.js +103 -0
  26. package/dist/templates/components/layout/Footer.d.ts +1 -1
  27. package/dist/templates/components/layout/Footer.js +7 -0
  28. package/dist/templates/components/layout/SharedStyles.d.ts +1 -1
  29. package/dist/templates/components/layout/SharedStyles.js +47 -0
  30. package/dist/templates/components/layout/SidePanel.d.ts +1 -0
  31. package/dist/templates/components/layout/SidePanel.js +65 -0
  32. package/dist/templates/components/layout/StaticLinks.d.ts +1 -1
  33. package/dist/templates/components/layout/StaticLinks.js +8 -1
  34. package/dist/templates/llms/llmsIndex.d.ts +13 -0
  35. package/dist/templates/llms/llmsIndex.js +18 -10
  36. package/dist/templates/llms/llmsPage.js +2 -0
  37. package/dist/templates/llms/skillMd.d.ts +10 -0
  38. package/dist/templates/llms/skillMd.js +59 -0
  39. package/dist/templates/mdx/api-playground.mdx.d.ts +1 -1
  40. package/dist/templates/mdx/api-playground.mdx.js +1 -1
  41. package/dist/templates/mdx/badges.mdx.d.ts +1 -1
  42. package/dist/templates/mdx/badges.mdx.js +2 -0
  43. package/dist/templates/mdx/color-swatches.mdx.d.ts +1 -1
  44. package/dist/templates/mdx/color-swatches.mdx.js +1 -1
  45. package/dist/templates/mdx/components.mdx.d.ts +1 -1
  46. package/dist/templates/mdx/components.mdx.js +3 -0
  47. package/dist/templates/mdx/fields.mdx.d.ts +1 -1
  48. package/dist/templates/mdx/fields.mdx.js +1 -1
  49. package/dist/templates/mdx/mermaid.mdx.d.ts +1 -1
  50. package/dist/templates/mdx/mermaid.mdx.js +1 -1
  51. package/dist/templates/mdx/navigation.mdx.d.ts +1 -1
  52. package/dist/templates/mdx/navigation.mdx.js +1 -0
  53. package/dist/templates/mdx/side-panel.mdx.d.ts +1 -0
  54. package/dist/templates/mdx/side-panel.mdx.js +62 -0
  55. package/dist/templates/mdx/update.mdx.d.ts +1 -1
  56. package/dist/templates/mdx/update.mdx.js +1 -1
  57. package/dist/templates/next.config.js +17 -0
  58. package/dist/templates/package.js +2 -2
  59. package/dist/templates/proxy.js +30 -2
  60. package/package.json +2 -2
@@ -1 +1 @@
1
- export declare const componentsMdxTemplate = "---\ntitle: \"Components\"\ndescription: \"Explore the full library of built-in components available in your documentation pages.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\ncategoryIcon: \"blocks\"\norder: 0\n---\n# Components\n\nDoccupine includes a rich set of built-in components you can use directly in your MDX files - no imports needed. Browse the full library below.\n\n<Columns cols={2}>\n <Card title=\"Headers and Text\" icon=\"heading\" href=\"/headers-and-text\">\n Headings, paragraphs, bold, italic, links, and other text formatting.\n </Card>\n <Card title=\"Lists and Tables\" icon=\"list\" href=\"/lists-and-tables\">\n Ordered lists, unordered lists, and data tables.\n </Card>\n <Card title=\"Code\" icon=\"code\" href=\"/code\">\n Inline code, fenced code blocks, and syntax highlighting.\n </Card>\n <Card title=\"Prompt\" icon=\"sparkles\" href=\"/prompt\">\n Pre-built AI prompts readers can copy or open in Cursor.\n </Card>\n <Card title=\"Callouts\" icon=\"megaphone\" href=\"/callouts\">\n Highlighted blocks for tips, warnings, and important notes.\n </Card>\n <Card title=\"Accordion\" icon=\"chevrons-down\" href=\"/accordion\">\n Collapsible sections for organizing lengthy content.\n </Card>\n <Card title=\"Tabs\" icon=\"panel-top\" href=\"/tabs\">\n Tabbed interfaces for grouping related content.\n </Card>\n <Card title=\"Steps\" icon=\"footprints\" href=\"/steps\">\n Numbered step-by-step guides and walkthroughs.\n </Card>\n <Card title=\"Tree\" icon=\"folder-tree\" href=\"/tree\">\n File and folder structures with collapsible nodes and keyboard navigation.\n </Card>\n <Card title=\"Cards\" icon=\"square\" href=\"/cards\">\n Visual containers for content, icons, and links.\n </Card>\n <Card title=\"Buttons\" icon=\"mouse-pointer-click\" href=\"/buttons\">\n Action components with variants, sizes, and icons.\n </Card>\n <Card title=\"Badges\" icon=\"tag\" href=\"/badges\">\n Colored labels for statuses, versions, and metadata.\n </Card>\n <Card title=\"Tooltips\" icon=\"message-square\" href=\"/tooltips\">\n Contextual definitions and explanations shown on hover.\n </Card>\n <Card title=\"Images and Embeds\" icon=\"image\" href=\"/images-and-embeds\">\n Images, videos, and embedded content.\n </Card>\n <Card title=\"Frames\" icon=\"frame\" href=\"/frames\">\n Bordered containers with captions for images, videos, and diagrams.\n </Card>\n <Card title=\"Icons\" icon=\"smile\" href=\"/icons\">\n Lucide icons you can use anywhere in your docs.\n </Card>\n <Card title=\"Columns\" icon=\"columns-3\" href=\"/columns\">\n Grid layouts for arranging cards and content side by side.\n </Card>\n <Card title=\"Fields\" icon=\"text-cursor-input\" href=\"/fields\">\n Property and parameter documentation blocks.\n </Card>\n <Card title=\"API Playground\" icon=\"square-terminal\" href=\"/api-playground\">\n Interactive API reference where readers send real requests and see live responses.\n </Card>\n <Card title=\"Update\" icon=\"bell\" href=\"/update\">\n Changelog blocks with a subscribable RSS feed.\n </Card>\n <Card title=\"Color Swatches\" icon=\"palette\" href=\"/color-swatches\">\n Visual color palette swatches to document your theme colors.\n </Card>\n <Card title=\"Mermaid\" icon=\"workflow\" href=\"/mermaid\">\n Flowcharts, sequence diagrams, and other visualizations from Mermaid syntax.\n </Card>\n</Columns>";
1
+ export declare const componentsMdxTemplate = "---\ntitle: \"Components\"\ndescription: \"Explore the full library of built-in components available in your documentation pages.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\ncategoryIcon: \"blocks\"\norder: 0\n---\n# Components\n\nDoccupine includes a rich set of built-in components you can use directly in your MDX files - no imports needed. Browse the full library below.\n\n<Columns cols={2}>\n <Card title=\"Headers and Text\" icon=\"heading\" href=\"/headers-and-text\">\n Headings, paragraphs, bold, italic, links, and other text formatting.\n </Card>\n <Card title=\"Lists and Tables\" icon=\"list\" href=\"/lists-and-tables\">\n Ordered lists, unordered lists, and data tables.\n </Card>\n <Card title=\"Code\" icon=\"code\" href=\"/code\">\n Inline code, fenced code blocks, and syntax highlighting.\n </Card>\n <Card title=\"Prompt\" icon=\"sparkles\" href=\"/prompt\">\n Pre-built AI prompts readers can copy or open in Cursor.\n </Card>\n <Card title=\"Callouts\" icon=\"megaphone\" href=\"/callouts\">\n Highlighted blocks for tips, warnings, and important notes.\n </Card>\n <Card title=\"Accordion\" icon=\"chevrons-down\" href=\"/accordion\">\n Collapsible sections for organizing lengthy content.\n </Card>\n <Card title=\"Tabs\" icon=\"panel-top\" href=\"/tabs\">\n Tabbed interfaces for grouping related content.\n </Card>\n <Card title=\"Steps\" icon=\"footprints\" href=\"/steps\">\n Numbered step-by-step guides and walkthroughs.\n </Card>\n <Card title=\"Tree\" icon=\"folder-tree\" href=\"/tree\">\n File and folder structures with collapsible nodes and keyboard navigation.\n </Card>\n <Card title=\"Cards\" icon=\"square\" href=\"/cards\">\n Visual containers for content, icons, and links.\n </Card>\n <Card title=\"Buttons\" icon=\"mouse-pointer-click\" href=\"/buttons\">\n Action components with variants, sizes, and icons.\n </Card>\n <Card title=\"Badges\" icon=\"tag\" href=\"/badges\">\n Colored labels for statuses, versions, and metadata.\n </Card>\n <Card title=\"Tooltips\" icon=\"message-square\" href=\"/tooltips\">\n Contextual definitions and explanations shown on hover.\n </Card>\n <Card title=\"Images and Embeds\" icon=\"image\" href=\"/images-and-embeds\">\n Images, videos, and embedded content.\n </Card>\n <Card title=\"Frames\" icon=\"frame\" href=\"/frames\">\n Bordered containers with captions for images, videos, and diagrams.\n </Card>\n <Card title=\"Icons\" icon=\"smile\" href=\"/icons\">\n Lucide icons you can use anywhere in your docs.\n </Card>\n <Card title=\"Columns\" icon=\"columns-3\" href=\"/columns\">\n Grid layouts for arranging cards and content side by side.\n </Card>\n <Card title=\"Side Panel\" icon=\"panel-right\" href=\"/side-panel\">\n Pinned right-rail content that replaces a page's table of contents.\n </Card>\n <Card title=\"Fields\" icon=\"text-cursor-input\" href=\"/fields\">\n Property and parameter documentation blocks.\n </Card>\n <Card title=\"API Playground\" icon=\"square-terminal\" href=\"/api-playground\">\n Interactive API reference where readers send real requests and see live responses.\n </Card>\n <Card title=\"Update\" icon=\"bell\" href=\"/update\">\n Changelog blocks with a subscribable RSS feed.\n </Card>\n <Card title=\"Color Swatches\" icon=\"palette\" href=\"/color-swatches\">\n Visual color palette swatches to document your theme colors.\n </Card>\n <Card title=\"Mermaid\" icon=\"workflow\" href=\"/mermaid\">\n Flowcharts, sequence diagrams, and other visualizations from Mermaid syntax.\n </Card>\n</Columns>";
@@ -63,6 +63,9 @@ Doccupine includes a rich set of built-in components you can use directly in you
63
63
  <Card title="Columns" icon="columns-3" href="/columns">
64
64
  Grid layouts for arranging cards and content side by side.
65
65
  </Card>
66
+ <Card title="Side Panel" icon="panel-right" href="/side-panel">
67
+ Pinned right-rail content that replaces a page's table of contents.
68
+ </Card>
66
69
  <Card title="Fields" icon="text-cursor-input" href="/fields">
67
70
  Property and parameter documentation blocks.
68
71
  </Card>
@@ -1 +1 @@
1
- export declare const fieldsMdxTemplate = "---\ntitle: \"Fields\"\ndescription: \"Configure parameters for your API or SDK documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 18\n---\n# Fields\n\nConfigure parameters for your API or SDK documentation.\n\nFields allow you to describe both the **inputs** (parameters) and **outputs** (responses) of your API. The main field component is available: `Field` for parameters and for responses.\n\n## Fields Usage\n\nUse the `<Field>` component to declare API or SDK parameters, or define the return values of an API.\n\n<Field value=\"param\" type=\"string\" required>\n Example definition of a parameter field.\n</Field>\n\n```html\n<Field value=\"param\" type=\"string\" required>\n Example definition of a parameter field.\n</Field>\n```\n\n## Properties\n\n<Field value=\"value\" type=\"string\" required>\n The name of the field.\n</Field>\n\n<Field value=\"type\" type=\"string\" required>\n The type of the field.\n</Field>\n\n<Field value=\"required\" type=\"boolean\">\n Whether the field is required.\n</Field>";
1
+ export declare const fieldsMdxTemplate = "---\ntitle: \"Fields\"\ndescription: \"Configure parameters for your API or SDK documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 19\n---\n# Fields\n\nConfigure parameters for your API or SDK documentation.\n\nFields allow you to describe both the **inputs** (parameters) and **outputs** (responses) of your API. The main field component is available: `Field` for parameters and for responses.\n\n## Fields Usage\n\nUse the `<Field>` component to declare API or SDK parameters, or define the return values of an API.\n\n<Field value=\"param\" type=\"string\" required>\n Example definition of a parameter field.\n</Field>\n\n```html\n<Field value=\"param\" type=\"string\" required>\n Example definition of a parameter field.\n</Field>\n```\n\n## Properties\n\n<Field value=\"value\" type=\"string\" required>\n The name of the field.\n</Field>\n\n<Field value=\"type\" type=\"string\" required>\n The type of the field.\n</Field>\n\n<Field value=\"required\" type=\"boolean\">\n Whether the field is required.\n</Field>";
@@ -4,7 +4,7 @@ description: "Configure parameters for your API or SDK documentation."
4
4
  date: "2026-02-19"
5
5
  category: "Components"
6
6
  categoryOrder: 1
7
- order: 18
7
+ order: 19
8
8
  ---
9
9
  # Fields
10
10
 
@@ -1 +1 @@
1
- export declare const mermaidMdxTemplate = "---\ntitle: \"Mermaid\"\ndescription: \"Create flowcharts, sequence diagrams, and other visualizations using Mermaid syntax.\"\ndate: \"2026-07-16\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 22\n---\n# Mermaid\n\nCreate flowcharts, sequence diagrams, and other visualizations using Mermaid syntax with automatic rendering.\n\nWrite a diagram inside a `mermaid` code fence and it renders as an SVG:\n\n````mdx\n```mermaid\nflowchart LR\n A[Start] --> B{Decision}\n B -->|Yes| C[Action]\n B -->|No| D[End]\n```\n````\n\n```mermaid\nflowchart LR\n A[Start] --> B{Decision}\n B -->|Yes| C[Action]\n B -->|No| D[End]\n```\n\nDiagrams are rendered when your site is built, so no diagramming library is shipped to your readers' browsers. They are drawn with your theme's colors and follow the light and dark toggle automatically.\n\n## Supported diagram types\n\nDoccupine renders diagrams with [beautiful-mermaid](https://github.com/lukilabs/beautiful-mermaid), which supports six diagram types:\n\n| Type | Opening keyword |\n| --- | --- |\n| Flowchart | `flowchart` or `graph` |\n| Sequence | `sequenceDiagram` |\n| State | `stateDiagram-v2` |\n| Class | `classDiagram` |\n| Entity relationship | `erDiagram` |\n| XY chart | `xychart-beta` |\n\nOther Mermaid diagram types - including `pie`, `gantt`, `mindmap`, `journey`, and `gitGraph` - are not supported. A diagram that cannot be rendered falls back to a plain code block showing its source, and the reason is logged when your site builds. A broken diagram never breaks the page.\n\n## Examples\n\n### Sequence diagram\n\n```mermaid\nsequenceDiagram\n participant Reader\n participant Docs\n participant Search\n Reader->>Docs: Open a page\n Docs->>Search: Index the content\n Search-->>Reader: Return results\n```\n\n### Subgraphs\n\n```mermaid placement=\"top-right\"\nflowchart LR\n subgraph one\n direction TB\n top1[top] --> bottom1[bottom]\n end\n subgraph two\n direction TB\n top2[top] --> bottom2[bottom]\n end\n outside --> one\n outside --> top2\n```\n\n## Interactive controls\n\nDiagrams include zoom in and out, pan in four directions, reset the view, and full screen. You can also drag a diagram with your mouse to move it around.\n\nBy default the controls appear once a diagram is taller than 120px, since a diagram that already fits does not need them. Use the `actions` property to decide explicitly. Setting `actions={false}` turns off the whole interactive layer, including dragging.\n\n## Properties\n\n<Field value=\"placement\" type=\"string\">\n Where the controls sit. One of `top-left`, `top-right`, `bottom-left`, or `bottom-right`. Defaults to `bottom-right`.\n</Field>\n\n<Field value=\"actions\" type=\"boolean\">\n Show or hide the controls. When set, this overrides the default behavior of showing them only on diagrams taller than 120px.\n</Field>\n\nSet properties on the opening fence, after the language:\n\n````mdx\n```mermaid placement=\"top-left\" actions={true}\nflowchart LR\n A --> B\n```\n````\n\nTo hide the controls entirely:\n\n````mdx\n```mermaid actions={false}\nflowchart LR\n A --> B\n```\n````\n\n```mermaid actions={false}\nflowchart LR\n A --> B\n```\n\n## Layout\n\nDiagrams are laid out with the [ELK](https://eclipse.dev/elk/) engine, which arranges nodes to reduce overlapping edges and keep large diagrams readable. It is always on, so no directive is needed to enable it.\n\nIf you are porting diagrams from another tool, a `%%{init: ...}%%` directive is read as a comment and ignored rather than causing an error.\n\n## Theming\n\nDiagram colors come from CSS variables, so they follow your theme and the light/dark toggle without re-rendering. Override any of them in your own CSS to restyle diagrams:\n\n```css\n:root {\n --mermaid-bg: var(--color-light);\n --mermaid-fg: var(--color-dark);\n --mermaid-line: var(--color-grayDark);\n --mermaid-accent: var(--color-accent);\n --mermaid-muted: var(--color-grayDark);\n --mermaid-surface: var(--color-grayLight);\n --mermaid-border: var(--color-gray);\n}\n```\n\n## Syntax reference\n\nFor the syntax of each supported diagram type, see the [Mermaid documentation](https://mermaid.js.org/intro/). Keep to the six types listed above.";
1
+ export declare const mermaidMdxTemplate = "---\ntitle: \"Mermaid\"\ndescription: \"Create flowcharts, sequence diagrams, and other visualizations using Mermaid syntax.\"\ndate: \"2026-07-16\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 23\n---\n# Mermaid\n\nCreate flowcharts, sequence diagrams, and other visualizations using Mermaid syntax with automatic rendering.\n\nWrite a diagram inside a `mermaid` code fence and it renders as an SVG:\n\n````mdx\n```mermaid\nflowchart LR\n A[Start] --> B{Decision}\n B -->|Yes| C[Action]\n B -->|No| D[End]\n```\n````\n\n```mermaid\nflowchart LR\n A[Start] --> B{Decision}\n B -->|Yes| C[Action]\n B -->|No| D[End]\n```\n\nDiagrams are rendered when your site is built, so no diagramming library is shipped to your readers' browsers. They are drawn with your theme's colors and follow the light and dark toggle automatically.\n\n## Supported diagram types\n\nDoccupine renders diagrams with [beautiful-mermaid](https://github.com/lukilabs/beautiful-mermaid), which supports six diagram types:\n\n| Type | Opening keyword |\n| --- | --- |\n| Flowchart | `flowchart` or `graph` |\n| Sequence | `sequenceDiagram` |\n| State | `stateDiagram-v2` |\n| Class | `classDiagram` |\n| Entity relationship | `erDiagram` |\n| XY chart | `xychart-beta` |\n\nOther Mermaid diagram types - including `pie`, `gantt`, `mindmap`, `journey`, and `gitGraph` - are not supported. A diagram that cannot be rendered falls back to a plain code block showing its source, and the reason is logged when your site builds. A broken diagram never breaks the page.\n\n## Examples\n\n### Sequence diagram\n\n```mermaid\nsequenceDiagram\n participant Reader\n participant Docs\n participant Search\n Reader->>Docs: Open a page\n Docs->>Search: Index the content\n Search-->>Reader: Return results\n```\n\n### Subgraphs\n\n```mermaid placement=\"top-right\"\nflowchart LR\n subgraph one\n direction TB\n top1[top] --> bottom1[bottom]\n end\n subgraph two\n direction TB\n top2[top] --> bottom2[bottom]\n end\n outside --> one\n outside --> top2\n```\n\n## Interactive controls\n\nDiagrams include zoom in and out, pan in four directions, reset the view, and full screen. You can also drag a diagram with your mouse to move it around.\n\nBy default the controls appear once a diagram is taller than 120px, since a diagram that already fits does not need them. Use the `actions` property to decide explicitly. Setting `actions={false}` turns off the whole interactive layer, including dragging.\n\n## Properties\n\n<Field value=\"placement\" type=\"string\">\n Where the controls sit. One of `top-left`, `top-right`, `bottom-left`, or `bottom-right`. Defaults to `bottom-right`.\n</Field>\n\n<Field value=\"actions\" type=\"boolean\">\n Show or hide the controls. When set, this overrides the default behavior of showing them only on diagrams taller than 120px.\n</Field>\n\nSet properties on the opening fence, after the language:\n\n````mdx\n```mermaid placement=\"top-left\" actions={true}\nflowchart LR\n A --> B\n```\n````\n\nTo hide the controls entirely:\n\n````mdx\n```mermaid actions={false}\nflowchart LR\n A --> B\n```\n````\n\n```mermaid actions={false}\nflowchart LR\n A --> B\n```\n\n## Layout\n\nDiagrams are laid out with the [ELK](https://eclipse.dev/elk/) engine, which arranges nodes to reduce overlapping edges and keep large diagrams readable. It is always on, so no directive is needed to enable it.\n\nIf you are porting diagrams from another tool, a `%%{init: ...}%%` directive is read as a comment and ignored rather than causing an error.\n\n## Theming\n\nDiagram colors come from CSS variables, so they follow your theme and the light/dark toggle without re-rendering. Override any of them in your own CSS to restyle diagrams:\n\n```css\n:root {\n --mermaid-bg: var(--color-light);\n --mermaid-fg: var(--color-dark);\n --mermaid-line: var(--color-grayDark);\n --mermaid-accent: var(--color-accent);\n --mermaid-muted: var(--color-grayDark);\n --mermaid-surface: var(--color-grayLight);\n --mermaid-border: var(--color-gray);\n}\n```\n\n## Syntax reference\n\nFor the syntax of each supported diagram type, see the [Mermaid documentation](https://mermaid.js.org/intro/). Keep to the six types listed above.";
@@ -4,7 +4,7 @@ description: "Create flowcharts, sequence diagrams, and other visualizations usi
4
4
  date: "2026-07-16"
5
5
  category: "Components"
6
6
  categoryOrder: 1
7
- order: 22
7
+ order: 23
8
8
  ---
9
9
  # Mermaid
10
10
 
@@ -1 +1 @@
1
- export declare const navigationMdxTemplate = "---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 2\n---\n# Navigation\n\nDoccupine builds your sidebar automatically from your MDX pages. By default, it reads the page frontmatter and groups pages into categories in the order you define. For larger docs, you can take full control with a `navigation.json` file.\n\n## Automatic navigation (default)\n\nWhen no custom navigation is provided, Doccupine generates a structure based on each page's frontmatter.\n\n### Frontmatter fields\n\n- **category**: The category name that groups the page in the sidebar.\n- **categoryOrder**: The position of the category within the sidebar. Lower numbers appear first.\n- **order**: The position of the page within its category. Lower numbers appear first.\n- **navIcon**: Optional [Lucide](https://lucide.dev/icons) icon name shown next to the page's sidebar link.\n- **categoryIcon**: Optional Lucide icon name for the page's category header. The first page in a category that sets it wins.\n\n### Example frontmatter\n\n```text\n---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2025-01-15\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 2\n---\n```\n\nThis approach is great for small sets of documents. For larger projects, setting these fields on every page can become repetitive.\n\n## Custom navigation with navigation.json\n\nTo centrally define the entire sidebar, create a `navigation.json` at your project root (the same directory where you execute `npx doccupine`). When present, it takes priority over page frontmatter and fully controls the navigation structure.\n\n### Array format\n\nThe simplest format is an array of categories. When using [sections](/sections), this applies to the root section only.\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Introduction\" },\n { \"slug\": \"what-is-doccupine\", \"title\": \"What is Doccupine\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n },\n {\n \"label\": \"Components\",\n \"links\": [\n { \"slug\": \"components\", \"title\": \"Components\" },\n { \"slug\": \"headers-and-text\", \"title\": \"Headers and Text\" },\n { \"slug\": \"lists-and-tables\", \"title\": \"Lists and tables\" },\n { \"slug\": \"code\", \"title\": \"Code\" },\n { \"slug\": \"prompt\", \"title\": \"Prompt\" },\n { \"slug\": \"callouts\", \"title\": \"Callouts\" },\n { \"slug\": \"accordion\", \"title\": \"Accordion\" },\n { \"slug\": \"tabs\", \"title\": \"Tabs\" },\n { \"slug\": \"steps\", \"title\": \"Steps\" },\n { \"slug\": \"tree\", \"title\": \"Tree\" },\n { \"slug\": \"cards\", \"title\": \"Cards\" },\n { \"slug\": \"buttons\", \"title\": \"Buttons\" },\n { \"slug\": \"badges\", \"title\": \"Badges\" },\n { \"slug\": \"tooltips\", \"title\": \"Tooltips\" },\n { \"slug\": \"images-and-embeds\", \"title\": \"Images and embeds\" },\n { \"slug\": \"frames\", \"title\": \"Frames\" },\n { \"slug\": \"icons\", \"title\": \"Icons\" },\n { \"slug\": \"columns\", \"title\": \"Columns\" },\n { \"slug\": \"fields\", \"title\": \"Fields\" },\n { \"slug\": \"api-playground\", \"title\": \"API Playground\" },\n { \"slug\": \"update\", \"title\": \"Update\" },\n { \"slug\": \"color-swatches\", \"title\": \"Color Swatches\" },\n { \"slug\": \"mermaid\", \"title\": \"Mermaid\" }\n ]\n },\n {\n \"label\": \"Configuration\",\n \"links\": [\n { \"slug\": \"globals\", \"title\": \"Globals\" },\n { \"slug\": \"navigation\", \"title\": \"Navigation\" },\n { \"slug\": \"sections\", \"title\": \"Sections\" },\n { \"slug\": \"footer-links\", \"title\": \"Footer Links\" },\n { \"slug\": \"theme\", \"title\": \"Theme\" },\n { \"slug\": \"fonts\", \"title\": \"Fonts\" },\n { \"slug\": \"media-and-assets\", \"title\": \"Media and assets\" }\n ]\n },\n {\n \"label\": \"AI & Integrations\",\n \"links\": [\n { \"slug\": \"ai-assistant\", \"title\": \"AI Assistant\" },\n { \"slug\": \"model-context-protocol\", \"title\": \"Model Context Protocol\" },\n { \"slug\": \"analytics\", \"title\": \"Analytics\" }\n ]\n },\n {\n \"label\": \"Deployment\",\n \"links\": [\n { \"slug\": \"deployment-and-hosting\", \"title\": \"Deployment & Hosting\" },\n { \"slug\": \"authentication\", \"title\": \"Authentication\" }\n ]\n }\n]\n```\n\n### Object format (per-section)\n\nWhen using [sections](/sections), you can define navigation for each section by using an object keyed by section slug. Sections without a key fall back to auto-generated navigation from frontmatter.\n\n```json\n{\n \"\": [\n {\n \"label\": \"General\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Getting Started\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n }\n ],\n \"platform\": [\n {\n \"label\": \"Overview\",\n \"links\": [\n { \"slug\": \"platform/auth\", \"title\": \"Authentication\" },\n { \"slug\": \"platform/users\", \"title\": \"Users\" }\n ]\n }\n ]\n}\n```\n\nThe key `\"\"` controls the root section. Other keys match section slugs defined in `sections.json` or derived from frontmatter. See [Sections](/sections) for details on configuring sections.\n\n### Fields\n\n- **label**: The section header shown in the sidebar.\n- **icon**: Optional [Lucide](https://lucide.dev/icons) icon name shown next to the category header.\n- **links**: An array of page entries for that section.\n - **slug**: The MDX file slug (filename without extension). Use an empty string `\"\"` for `index.mdx`.\n - **title**: The display title in the navigation. This can differ from the page's `title` frontmatter.\n - **icon**: Optional Lucide icon name shown next to the link.\n - **links**: Optional array of nested child links. See [Nested navigation](#nested-navigation).\n\n## Icons\n\nAdd icons to categories and links to make the sidebar easier to scan. Icons use [Lucide](https://lucide.dev/icons) names in kebab-case (e.g. `rocket`, `book-open`, `settings`). Unknown names render nothing, so a typo never breaks the build.\n\nWith frontmatter, set `navIcon` on a page for its sidebar link and `categoryIcon` for its category:\n\n```text\n---\ntitle: \"Introduction\"\ncategory: \"Getting Started\"\ncategoryOrder: 1\norder: 1\nnavIcon: \"rocket\"\ncategoryIcon: \"book-open\"\n---\n```\n\nWith `navigation.json`, add an `icon` to any category or link:\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"icon\": \"book-open\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Introduction\", \"icon\": \"rocket\" },\n { \"slug\": \"commands\", \"title\": \"Commands\", \"icon\": \"terminal\" }\n ]\n }\n]\n```\n\n## Nested navigation\n\nA link in `navigation.json` can hold its own `links` array to create a collapsible group. Groups expand and collapse on click and open automatically when one of their pages is active. Nesting can go as deep as you need.\n\n```json\n[\n {\n \"label\": \"Guides\",\n \"icon\": \"book-open\",\n \"links\": [\n { \"slug\": \"guides\", \"title\": \"Overview\", \"icon\": \"compass\" },\n {\n \"title\": \"Advanced\",\n \"icon\": \"settings\",\n \"links\": [\n { \"slug\": \"guides/caching\", \"title\": \"Caching\" },\n { \"slug\": \"guides/streaming\", \"title\": \"Streaming\" }\n ]\n }\n ]\n }\n]\n```\n\nA group can be a plain label - omit `slug` and it acts only as a collapsible header - or a real page, by adding a `slug` so the group title is also a link.\n\n<Callout type=\"note\">\n Nested groups are only available through `navigation.json`. Frontmatter navigation is always two levels: category and pages.\n</Callout>\n\n## Precedence and behavior\n\n<Callout type=\"note\">\n `navigation.json` takes priority over frontmatter. If present, it fully controls the sidebar structure for the sections it covers.\n</Callout>\n\n- Without `navigation.json`, the sidebar is built from page frontmatter: `category` -> grouped; `categoryOrder` -> category position; `order` -> page position.\n- When using the object format, sections not listed in `navigation.json` fall back to frontmatter-based navigation.\n- Pages without a `category` appear at the top level.\n\n## Tips\n\n- **Start simple**: Use frontmatter for small docs. Switch to `navigation.json` as the structure grows.\n- **Keep slugs consistent**: `slug` must match the MDX filename (e.g., `text.mdx` -> `text`).\n- **Control titles**: Use `title` in `navigation.json` to customize sidebar labels without changing page frontmatter.\n- **Per-section navigation**: Use the object format to define different sidebars for each section. Mix and match - define some sections explicitly and let others auto-generate.";
1
+ export declare const navigationMdxTemplate = "---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 2\n---\n# Navigation\n\nDoccupine builds your sidebar automatically from your MDX pages. By default, it reads the page frontmatter and groups pages into categories in the order you define. For larger docs, you can take full control with a `navigation.json` file.\n\n## Automatic navigation (default)\n\nWhen no custom navigation is provided, Doccupine generates a structure based on each page's frontmatter.\n\n### Frontmatter fields\n\n- **category**: The category name that groups the page in the sidebar.\n- **categoryOrder**: The position of the category within the sidebar. Lower numbers appear first.\n- **order**: The position of the page within its category. Lower numbers appear first.\n- **navIcon**: Optional [Lucide](https://lucide.dev/icons) icon name shown next to the page's sidebar link.\n- **categoryIcon**: Optional Lucide icon name for the page's category header. The first page in a category that sets it wins.\n\n### Example frontmatter\n\n```text\n---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2025-01-15\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 2\n---\n```\n\nThis approach is great for small sets of documents. For larger projects, setting these fields on every page can become repetitive.\n\n## Custom navigation with navigation.json\n\nTo centrally define the entire sidebar, create a `navigation.json` at your project root (the same directory where you execute `npx doccupine`). When present, it takes priority over page frontmatter and fully controls the navigation structure.\n\n### Array format\n\nThe simplest format is an array of categories. When using [sections](/sections), this applies to the root section only.\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Introduction\" },\n { \"slug\": \"what-is-doccupine\", \"title\": \"What is Doccupine\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n },\n {\n \"label\": \"Components\",\n \"links\": [\n { \"slug\": \"components\", \"title\": \"Components\" },\n { \"slug\": \"headers-and-text\", \"title\": \"Headers and Text\" },\n { \"slug\": \"lists-and-tables\", \"title\": \"Lists and tables\" },\n { \"slug\": \"code\", \"title\": \"Code\" },\n { \"slug\": \"prompt\", \"title\": \"Prompt\" },\n { \"slug\": \"callouts\", \"title\": \"Callouts\" },\n { \"slug\": \"accordion\", \"title\": \"Accordion\" },\n { \"slug\": \"tabs\", \"title\": \"Tabs\" },\n { \"slug\": \"steps\", \"title\": \"Steps\" },\n { \"slug\": \"tree\", \"title\": \"Tree\" },\n { \"slug\": \"cards\", \"title\": \"Cards\" },\n { \"slug\": \"buttons\", \"title\": \"Buttons\" },\n { \"slug\": \"badges\", \"title\": \"Badges\" },\n { \"slug\": \"tooltips\", \"title\": \"Tooltips\" },\n { \"slug\": \"images-and-embeds\", \"title\": \"Images and embeds\" },\n { \"slug\": \"frames\", \"title\": \"Frames\" },\n { \"slug\": \"icons\", \"title\": \"Icons\" },\n { \"slug\": \"columns\", \"title\": \"Columns\" },\n { \"slug\": \"side-panel\", \"title\": \"Side Panel\" },\n { \"slug\": \"fields\", \"title\": \"Fields\" },\n { \"slug\": \"api-playground\", \"title\": \"API Playground\" },\n { \"slug\": \"update\", \"title\": \"Update\" },\n { \"slug\": \"color-swatches\", \"title\": \"Color Swatches\" },\n { \"slug\": \"mermaid\", \"title\": \"Mermaid\" }\n ]\n },\n {\n \"label\": \"Configuration\",\n \"links\": [\n { \"slug\": \"globals\", \"title\": \"Globals\" },\n { \"slug\": \"navigation\", \"title\": \"Navigation\" },\n { \"slug\": \"sections\", \"title\": \"Sections\" },\n { \"slug\": \"footer-links\", \"title\": \"Footer Links\" },\n { \"slug\": \"theme\", \"title\": \"Theme\" },\n { \"slug\": \"fonts\", \"title\": \"Fonts\" },\n { \"slug\": \"media-and-assets\", \"title\": \"Media and assets\" }\n ]\n },\n {\n \"label\": \"AI & Integrations\",\n \"links\": [\n { \"slug\": \"ai-assistant\", \"title\": \"AI Assistant\" },\n { \"slug\": \"model-context-protocol\", \"title\": \"Model Context Protocol\" },\n { \"slug\": \"analytics\", \"title\": \"Analytics\" }\n ]\n },\n {\n \"label\": \"Deployment\",\n \"links\": [\n { \"slug\": \"deployment-and-hosting\", \"title\": \"Deployment & Hosting\" },\n { \"slug\": \"authentication\", \"title\": \"Authentication\" }\n ]\n }\n]\n```\n\n### Object format (per-section)\n\nWhen using [sections](/sections), you can define navigation for each section by using an object keyed by section slug. Sections without a key fall back to auto-generated navigation from frontmatter.\n\n```json\n{\n \"\": [\n {\n \"label\": \"General\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Getting Started\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n }\n ],\n \"platform\": [\n {\n \"label\": \"Overview\",\n \"links\": [\n { \"slug\": \"platform/auth\", \"title\": \"Authentication\" },\n { \"slug\": \"platform/users\", \"title\": \"Users\" }\n ]\n }\n ]\n}\n```\n\nThe key `\"\"` controls the root section. Other keys match section slugs defined in `sections.json` or derived from frontmatter. See [Sections](/sections) for details on configuring sections.\n\n### Fields\n\n- **label**: The section header shown in the sidebar.\n- **icon**: Optional [Lucide](https://lucide.dev/icons) icon name shown next to the category header.\n- **links**: An array of page entries for that section.\n - **slug**: The MDX file slug (filename without extension). Use an empty string `\"\"` for `index.mdx`.\n - **title**: The display title in the navigation. This can differ from the page's `title` frontmatter.\n - **icon**: Optional Lucide icon name shown next to the link.\n - **links**: Optional array of nested child links. See [Nested navigation](#nested-navigation).\n\n## Icons\n\nAdd icons to categories and links to make the sidebar easier to scan. Icons use [Lucide](https://lucide.dev/icons) names in kebab-case (e.g. `rocket`, `book-open`, `settings`). Unknown names render nothing, so a typo never breaks the build.\n\nWith frontmatter, set `navIcon` on a page for its sidebar link and `categoryIcon` for its category:\n\n```text\n---\ntitle: \"Introduction\"\ncategory: \"Getting Started\"\ncategoryOrder: 1\norder: 1\nnavIcon: \"rocket\"\ncategoryIcon: \"book-open\"\n---\n```\n\nWith `navigation.json`, add an `icon` to any category or link:\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"icon\": \"book-open\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Introduction\", \"icon\": \"rocket\" },\n { \"slug\": \"commands\", \"title\": \"Commands\", \"icon\": \"terminal\" }\n ]\n }\n]\n```\n\n## Nested navigation\n\nA link in `navigation.json` can hold its own `links` array to create a collapsible group. Groups expand and collapse on click and open automatically when one of their pages is active. Nesting can go as deep as you need.\n\n```json\n[\n {\n \"label\": \"Guides\",\n \"icon\": \"book-open\",\n \"links\": [\n { \"slug\": \"guides\", \"title\": \"Overview\", \"icon\": \"compass\" },\n {\n \"title\": \"Advanced\",\n \"icon\": \"settings\",\n \"links\": [\n { \"slug\": \"guides/caching\", \"title\": \"Caching\" },\n { \"slug\": \"guides/streaming\", \"title\": \"Streaming\" }\n ]\n }\n ]\n }\n]\n```\n\nA group can be a plain label - omit `slug` and it acts only as a collapsible header - or a real page, by adding a `slug` so the group title is also a link.\n\n<Callout type=\"note\">\n Nested groups are only available through `navigation.json`. Frontmatter navigation is always two levels: category and pages.\n</Callout>\n\n## Precedence and behavior\n\n<Callout type=\"note\">\n `navigation.json` takes priority over frontmatter. If present, it fully controls the sidebar structure for the sections it covers.\n</Callout>\n\n- Without `navigation.json`, the sidebar is built from page frontmatter: `category` -> grouped; `categoryOrder` -> category position; `order` -> page position.\n- When using the object format, sections not listed in `navigation.json` fall back to frontmatter-based navigation.\n- Pages without a `category` appear at the top level.\n\n## Tips\n\n- **Start simple**: Use frontmatter for small docs. Switch to `navigation.json` as the structure grows.\n- **Keep slugs consistent**: `slug` must match the MDX filename (e.g., `text.mdx` -> `text`).\n- **Control titles**: Use `title` in `navigation.json` to customize sidebar labels without changing page frontmatter.\n- **Per-section navigation**: Use the object format to define different sidebars for each section. Mix and match - define some sections explicitly and let others auto-generate.";
@@ -76,6 +76,7 @@ The simplest format is an array of categories. When using [sections](/sections),
76
76
  { "slug": "frames", "title": "Frames" },
77
77
  { "slug": "icons", "title": "Icons" },
78
78
  { "slug": "columns", "title": "Columns" },
79
+ { "slug": "side-panel", "title": "Side Panel" },
79
80
  { "slug": "fields", "title": "Fields" },
80
81
  { "slug": "api-playground", "title": "API Playground" },
81
82
  { "slug": "update", "title": "Update" },
@@ -0,0 +1 @@
1
+ export declare const sidePanelMdxTemplate = "---\ntitle: \"Side Panel\"\ndescription: \"Replace a page's table of contents with your own content, pinned to the right rail on desktop and inline on mobile.\"\ndate: \"2026-07-27\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 18\n---\n# Side Panel\n\nPin supplementary content - notes, links, examples, anything - to the right side of a page.\n\n<SidePanel>\n <Callout type=\"note\">\n This page uses a `SidePanel`, so it has no table of contents.\n </Callout>\n <Card title=\"Components\" icon=\"blocks\" href=\"/components\">\n Any component works inside a panel.\n </Card>\n</SidePanel>\n\nThe `SidePanel` component takes over the right rail that normally holds the \"On this page\" table of contents. Use it when a page benefits more from persistent context - a related link, a note, a quick reference - than from a list of headings.\n\n## Side Panel Usage\n\nPlace a `SidePanel` anywhere in your MDX file. On desktop its position in the file does not matter; it always renders in the right rail.\n\n```html\n<SidePanel>\n <Callout type=\"note\">Pin a note to the side panel.</Callout>\n</SidePanel>\n```\n\n## Behavior\n\n- **Desktop**: the panel is pinned to the right rail and scrolls independently of the page. It is as wide as the navigation sidebar, and on wide screens it grows to the width of the AI chat panel, with the page content, navigation buttons, and footer shifting left to make room.\n- **Mobile**: the panel renders inline, exactly where you placed it in the file. Put it near the top of the page if you want readers to see it first.\n- **Table of contents**: any page containing a `SidePanel` hides its \"On this page\" list. The panel and the table of contents share the same column.\n- **Code samples**: a `SidePanel` shown inside a code block is just text, so documenting the component does not hide your table of contents.\n\n<Callout type=\"warning\">\n Use one `SidePanel` per page. Multiple panels stack on top of each other in the right rail.\n</Callout>\n\n## What to put in a panel\n\nAny component works inside a `SidePanel`. Keep it scannable - the rail is meant for supporting material, not a second article.\n\n```html\n<SidePanel>\n <Card title=\"API Reference\" icon=\"code\" href=\"/api-playground\">\n Browse every endpoint.\n </Card>\n <Callout type=\"tip\">Panels scroll independently of the page.</Callout>\n</SidePanel>\n```\n\n## Properties\n\n<Field value=\"children\" type=\"node\" required>\n The content of the side panel.\n</Field>";
@@ -0,0 +1,62 @@
1
+ export const sidePanelMdxTemplate = `---
2
+ title: "Side Panel"
3
+ description: "Replace a page's table of contents with your own content, pinned to the right rail on desktop and inline on mobile."
4
+ date: "2026-07-27"
5
+ category: "Components"
6
+ categoryOrder: 1
7
+ order: 18
8
+ ---
9
+ # Side Panel
10
+
11
+ Pin supplementary content - notes, links, examples, anything - to the right side of a page.
12
+
13
+ <SidePanel>
14
+ <Callout type="note">
15
+ This page uses a \`SidePanel\`, so it has no table of contents.
16
+ </Callout>
17
+ <Card title="Components" icon="blocks" href="/components">
18
+ Any component works inside a panel.
19
+ </Card>
20
+ </SidePanel>
21
+
22
+ The \`SidePanel\` component takes over the right rail that normally holds the "On this page" table of contents. Use it when a page benefits more from persistent context - a related link, a note, a quick reference - than from a list of headings.
23
+
24
+ ## Side Panel Usage
25
+
26
+ Place a \`SidePanel\` anywhere in your MDX file. On desktop its position in the file does not matter; it always renders in the right rail.
27
+
28
+ \`\`\`html
29
+ <SidePanel>
30
+ <Callout type="note">Pin a note to the side panel.</Callout>
31
+ </SidePanel>
32
+ \`\`\`
33
+
34
+ ## Behavior
35
+
36
+ - **Desktop**: the panel is pinned to the right rail and scrolls independently of the page. It is as wide as the navigation sidebar, and on wide screens it grows to the width of the AI chat panel, with the page content, navigation buttons, and footer shifting left to make room.
37
+ - **Mobile**: the panel renders inline, exactly where you placed it in the file. Put it near the top of the page if you want readers to see it first.
38
+ - **Table of contents**: any page containing a \`SidePanel\` hides its "On this page" list. The panel and the table of contents share the same column.
39
+ - **Code samples**: a \`SidePanel\` shown inside a code block is just text, so documenting the component does not hide your table of contents.
40
+
41
+ <Callout type="warning">
42
+ Use one \`SidePanel\` per page. Multiple panels stack on top of each other in the right rail.
43
+ </Callout>
44
+
45
+ ## What to put in a panel
46
+
47
+ Any component works inside a \`SidePanel\`. Keep it scannable - the rail is meant for supporting material, not a second article.
48
+
49
+ \`\`\`html
50
+ <SidePanel>
51
+ <Card title="API Reference" icon="code" href="/api-playground">
52
+ Browse every endpoint.
53
+ </Card>
54
+ <Callout type="tip">Panels scroll independently of the page.</Callout>
55
+ </SidePanel>
56
+ \`\`\`
57
+
58
+ ## Properties
59
+
60
+ <Field value="children" type="node" required>
61
+ The content of the side panel.
62
+ </Field>`;
@@ -1 +1 @@
1
- export declare const updateMdxTemplate = "---\ntitle: \"Update\"\ndescription: \"Easily manage and present change history.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 20\nrss: true\n---\n# Update\n\nEasily manage and present change history.\n\nThe `Update` component helps you display release notes, version details, and changelogs in a standardized format.\n\nEach `Update` label is added to the \"On this page\" sidebar and gets its own anchor, so you can link directly to a specific entry.\n\n<Update label=\"v0.0.1\" description=\"Example\">\n ## Example entry\n\n You can include anything here - images, code snippets, or a bullet list of modifications.\n\n ![Demo Image](https://docs.doccupine.com/demo.png)\n\n ### Key additions\n\n - Fully responsive layout\n - Individual anchor for each update\n - Automatic RSS feed entry generation\n</Update>\n\n## Update Usage\n\nYou can combine multiple `Update` components to build complete changelogs.\n\n```html\n<Update label=\"v0.0.1\" description=\"Example\">\n ## Example entry\n\n You can include anything here - images, code snippets, or a bullet list of modifications.\n\n ![Demo Image](https://docs.doccupine.com/demo.png)\n\n ### Key additions\n\n - Fully responsive layout\n - Individual anchor for each update\n - Automatic RSS feed entry generation\n</Update>\n```\n\n## Subscribable changelogs\n\nEvery page that contains at least one `Update` component automatically publishes an RSS feed at its page URL with `/rss.xml` appended. For example, this page's feed lives at `/update/rss.xml`.\n\nEach `Update` becomes a feed entry: the `label` is the entry title, and the entry link deep-links to the update's anchor on the page. New entries reach subscribers as soon as the site is rebuilt with new `Update` components.\n\nFeed entries contain pure Markdown only. They exclude components, code, and HTML elements. Use the `rss` property to provide alternative text for feed readers when an update consists mostly of excluded content:\n\n```html\n<Update label=\"v0.0.2\" rss=\"Added dark mode and fixed sidebar links.\">\n <Frame>![Dark mode](https://docs.doccupine.com/demo.png)</Frame>\n</Update>\n```\n\nThe feed's channel title and description come from the page frontmatter, falling back to the site name and description from `config.json`. RSS feeds are only available on public documentation - password-protected sites do not expose them.\n\nRSS feeds can integrate with Slack, email, or other subscription tools to notify readers of changes. Some options include:\n\n- [Slack](https://slack.com/help/articles/218688467-Add-RSS-feeds-to-Slack)\n- [Email](https://zapier.com/apps/email/integrations/rss/1441/send-new-rss-feed-entries-via-email) via Zapier\n- Discord bots like [Readybot](https://readybot.io)\n\n## RSS button\n\nTo make the feed discoverable, add `rss: true` to the page frontmatter. This displays an RSS button at the top of the page that links to the feed - this page shows one. The button only appears when the page actually contains `Update` components.\n\n```yaml\n---\nrss: true\n---\n```\n\n## Properties\n\n<Field value=\"label\" type=\"string\" required>\n The label of the update. It also appears in the page's \"On this page\"\n navigation, acts as a deep-link anchor to this entry, and becomes the entry\n title in the page's RSS feed.\n</Field>\n\n<Field value=\"description\" type=\"string\">\n An optional description for the update. When omitted, no description is shown.\n</Field>\n\n<Field value=\"rss\" type=\"string\">\n Alternative pure-Markdown text for this entry in the page's RSS feed. When\n omitted, the feed uses the entry content with components, code, and HTML\n removed. Never rendered on the page.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the update.\n</Field>";
1
+ export declare const updateMdxTemplate = "---\ntitle: \"Update\"\ndescription: \"Easily manage and present change history.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 21\nrss: true\n---\n# Update\n\nEasily manage and present change history.\n\nThe `Update` component helps you display release notes, version details, and changelogs in a standardized format.\n\nEach `Update` label is added to the \"On this page\" sidebar and gets its own anchor, so you can link directly to a specific entry.\n\n<Update label=\"v0.0.1\" description=\"Example\">\n ## Example entry\n\n You can include anything here - images, code snippets, or a bullet list of modifications.\n\n ![Demo Image](https://docs.doccupine.com/demo.png)\n\n ### Key additions\n\n - Fully responsive layout\n - Individual anchor for each update\n - Automatic RSS feed entry generation\n</Update>\n\n## Update Usage\n\nYou can combine multiple `Update` components to build complete changelogs.\n\n```html\n<Update label=\"v0.0.1\" description=\"Example\">\n ## Example entry\n\n You can include anything here - images, code snippets, or a bullet list of modifications.\n\n ![Demo Image](https://docs.doccupine.com/demo.png)\n\n ### Key additions\n\n - Fully responsive layout\n - Individual anchor for each update\n - Automatic RSS feed entry generation\n</Update>\n```\n\n## Subscribable changelogs\n\nEvery page that contains at least one `Update` component automatically publishes an RSS feed at its page URL with `/rss.xml` appended. For example, this page's feed lives at `/update/rss.xml`.\n\nEach `Update` becomes a feed entry: the `label` is the entry title, and the entry link deep-links to the update's anchor on the page. New entries reach subscribers as soon as the site is rebuilt with new `Update` components.\n\nFeed entries contain pure Markdown only. They exclude components, code, and HTML elements. Use the `rss` property to provide alternative text for feed readers when an update consists mostly of excluded content:\n\n```html\n<Update label=\"v0.0.2\" rss=\"Added dark mode and fixed sidebar links.\">\n <Frame>![Dark mode](https://docs.doccupine.com/demo.png)</Frame>\n</Update>\n```\n\nThe feed's channel title and description come from the page frontmatter, falling back to the site name and description from `config.json`. RSS feeds are only available on public documentation - password-protected sites do not expose them.\n\nRSS feeds can integrate with Slack, email, or other subscription tools to notify readers of changes. Some options include:\n\n- [Slack](https://slack.com/help/articles/218688467-Add-RSS-feeds-to-Slack)\n- [Email](https://zapier.com/apps/email/integrations/rss/1441/send-new-rss-feed-entries-via-email) via Zapier\n- Discord bots like [Readybot](https://readybot.io)\n\n## RSS button\n\nTo make the feed discoverable, add `rss: true` to the page frontmatter. This displays an RSS button at the top of the page that links to the feed - this page shows one. The button only appears when the page actually contains `Update` components.\n\n```yaml\n---\nrss: true\n---\n```\n\n## Properties\n\n<Field value=\"label\" type=\"string\" required>\n The label of the update. It also appears in the page's \"On this page\"\n navigation, acts as a deep-link anchor to this entry, and becomes the entry\n title in the page's RSS feed.\n</Field>\n\n<Field value=\"description\" type=\"string\">\n An optional description for the update. When omitted, no description is shown.\n</Field>\n\n<Field value=\"rss\" type=\"string\">\n Alternative pure-Markdown text for this entry in the page's RSS feed. When\n omitted, the feed uses the entry content with components, code, and HTML\n removed. Never rendered on the page.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the update.\n</Field>";
@@ -4,7 +4,7 @@ description: "Easily manage and present change history."
4
4
  date: "2026-02-19"
5
5
  category: "Components"
6
6
  categoryOrder: 1
7
- order: 20
7
+ order: 21
8
8
  rss: true
9
9
  ---
10
10
  # Update
@@ -13,6 +13,16 @@ const nextConfig: NextConfig = {
13
13
  "/api/rag": ["./services/mcp/docs-index.json"],
14
14
  "/api/mcp": ["./services/mcp/docs-index.json"],
15
15
  },
16
+ // Discovery alias: agents probe /mcp for an MCP server. Auth for the alias
17
+ // is handled in the middleware, which runs before this rewrite.
18
+ async rewrites() {
19
+ return [
20
+ {
21
+ source: "/mcp",
22
+ destination: "/api/mcp",
23
+ },
24
+ ];
25
+ },
16
26
  };
17
27
 
18
28
  export default nextConfig;
@@ -36,8 +46,15 @@ const nextConfig: NextConfig = {
36
46
  "/api/rag": ["./services/mcp/docs-index.json"],
37
47
  "/api/mcp": ["./services/mcp/docs-index.json"],
38
48
  },
49
+ // The /mcp entry is a discovery alias: agents probe /mcp for an MCP server.
50
+ // Auth for the alias is handled in the middleware, which runs before this
51
+ // rewrite.
39
52
  async rewrites() {
40
53
  return [
54
+ {
55
+ source: "/mcp",
56
+ destination: "/api/mcp",
57
+ },
41
58
  {
42
59
  source: "/ingest/static/:path*",
43
60
  destination: "${assetsHost}/static/:path*",
@@ -16,7 +16,7 @@ export const packageJsonTemplate = JSON.stringify({
16
16
  "@langchain/google-genai": "^2.2.0",
17
17
  "@langchain/openai": "^1.5.5",
18
18
  "@mdx-js/react": "^3.1.1",
19
- "@modelcontextprotocol/sdk": "^1.29.0",
19
+ "@modelcontextprotocol/sdk": "^1.30.0",
20
20
  "beautiful-mermaid": "^1.1.3",
21
21
  "cherry-styled-components": "^0.2.11",
22
22
  langchain: "^1.5.4",
@@ -24,7 +24,7 @@ export const packageJsonTemplate = JSON.stringify({
24
24
  minisearch: "^7.2.0",
25
25
  next: "16.2.12",
26
26
  "next-mdx-remote": "^6.0.0",
27
- "posthog-js": "^1.407.2",
27
+ "posthog-js": "^1.407.3",
28
28
  "posthog-node": "^5.46.1",
29
29
  react: "19.2.8",
30
30
  "react-dom": "19.2.8",
@@ -255,8 +255,10 @@ ${fnSignature} {
255
255
  ${trackingInit} const pathname = req.nextUrl.pathname;
256
256
  const sitePassword = process.env.SITE_PASSWORD;
257
257
 
258
- // API key auth for /api/mcp when DOCS_API_KEY is configured
259
- if (pathname.startsWith("/api/mcp")) {
258
+ // API key auth for the MCP endpoint when DOCS_API_KEY is configured. Also
259
+ // matches /mcp, the discovery alias that next.config rewrites to /api/mcp
260
+ // after the middleware has run.
261
+ if (pathname.startsWith("/api/mcp") || pathname === "/mcp") {
260
262
  const apiKey = process.env.DOCS_API_KEY;
261
263
  if (apiKey) {
262
264
  const authHeader = req.headers.get("authorization");
@@ -308,6 +310,32 @@ ${trackingInit} const pathname = req.nextUrl.pathname;
308
310
  }
309
311
  }
310
312
 
313
+ // Content negotiation: agents that request markdown (Accept: text/markdown)
314
+ // are served the page's static .md mirror from public/. Runs after the
315
+ // SITE_PASSWORD gate so protected sites never expose markdown around the
316
+ // login screen. Only extensionless GET paths are rewritten, so assets, API
317
+ // routes, and the MCP alias stay untouched. The rewrite target is part of
318
+ // the CDN cache key, so HTML responses stay cacheable without a Vary header.
319
+ const accept = req.headers.get("accept") ?? "";
320
+ if (
321
+ req.method === "GET" &&
322
+ accept.includes("text/markdown") &&
323
+ !pathname.startsWith("/api") &&
324
+ !pathname.startsWith("/_next") &&
325
+ pathname !== "/gate" &&
326
+ pathname !== "/mcp" &&
327
+ !/\\.[a-z0-9]+$/i.test(pathname)
328
+ ) {
329
+ const url = req.nextUrl.clone();
330
+ url.pathname =
331
+ pathname === "/" ? "/index.md" : pathname.replace(/\\/$/, "") + ".md";
332
+ const mdRes = NextResponse.rewrite(url);
333
+ if (sitePassword) {
334
+ mdRes.headers.set("X-Robots-Tag", "noindex, nofollow");
335
+ }
336
+ return applyTracking(mdRes, tracking);
337
+ }
338
+
311
339
  const res = NextResponse.next();
312
340
 
313
341
  // While password protection is active, keep the whole site out of search
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doccupine",
3
- "version": "0.0.136",
3
+ "version": "0.0.138",
4
4
  "description": "Free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/fs-extra": "^11.0.4",
50
- "@types/node": "^26.1.1",
50
+ "@types/node": "^26.1.2",
51
51
  "@types/prompts": "^2.4.9",
52
52
  "prettier": "^3.9.6",
53
53
  "typescript": "^7.0.2",