doccupine 0.0.157 → 0.0.159

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 (153) hide show
  1. package/README.md +52 -2
  2. package/dist/generator/app-scaffolder.js +11 -3
  3. package/dist/generator/generated-page-publisher.d.ts +6 -6
  4. package/dist/generator/generated-page-publisher.js +7 -5
  5. package/dist/generator/icon-registry-generator.d.ts +8 -5
  6. package/dist/generator/icon-registry-generator.js +19 -11
  7. package/dist/generator/mdx-pass-builder.d.ts +4 -4
  8. package/dist/generator/mdx-pass-builder.js +8 -1
  9. package/dist/generator/mdx-reconciliation-coordinator.d.ts +23 -9
  10. package/dist/generator/mdx-reconciliation-coordinator.js +63 -9
  11. package/dist/generator/page-catalog.d.ts +2 -4
  12. package/dist/generator/page-catalog.js +7 -2
  13. package/dist/generator/page-renderer.d.ts +15 -5
  14. package/dist/generator/page-renderer.js +38 -11
  15. package/dist/generator/project-config-repository.d.ts +4 -1
  16. package/dist/generator/project-config-repository.js +26 -0
  17. package/dist/generator/public-asset-manager.d.ts +10 -0
  18. package/dist/generator/public-asset-manager.js +63 -3
  19. package/dist/generator/section-index-generator.d.ts +10 -1
  20. package/dist/generator/section-index-generator.js +43 -15
  21. package/dist/generator/section-resolver.d.ts +8 -0
  22. package/dist/generator/site-artifacts.d.ts +4 -3
  23. package/dist/generator/site-artifacts.js +94 -9
  24. package/dist/generator/watch-coordinator.js +6 -1
  25. package/dist/lib/generated-artifacts.d.ts +3 -0
  26. package/dist/lib/generated-artifacts.js +36 -0
  27. package/dist/lib/icon-registry.d.ts +10 -4
  28. package/dist/lib/icon-registry.js +13 -4
  29. package/dist/lib/layout.d.ts +6 -3
  30. package/dist/lib/layout.js +107 -4
  31. package/dist/lib/metadata.d.ts +7 -0
  32. package/dist/lib/metadata.js +33 -10
  33. package/dist/lib/structures.js +20 -0
  34. package/dist/lib/types.d.ts +28 -0
  35. package/dist/lib/ui-strings.d.ts +44 -0
  36. package/dist/lib/ui-strings.js +48 -0
  37. package/dist/lib/variants.d.ts +91 -0
  38. package/dist/lib/variants.js +411 -0
  39. package/dist/mdx-to-nextjs-generator.d.ts +22 -5
  40. package/dist/mdx-to-nextjs-generator.js +92 -12
  41. package/dist/templates/app/api/mcp/route.d.ts +1 -1
  42. package/dist/templates/app/api/mcp/route.js +14 -1
  43. package/dist/templates/app/api/rag/route.d.ts +1 -1
  44. package/dist/templates/app/api/rag/route.js +13 -2
  45. package/dist/templates/app/api/search/route.d.ts +1 -1
  46. package/dist/templates/app/api/search/route.js +16 -1
  47. package/dist/templates/app/sitemap.d.ts +2 -0
  48. package/dist/templates/app/sitemap.js +48 -3
  49. package/dist/templates/components/Chat.d.ts +1 -1
  50. package/dist/templates/components/Chat.js +40 -12
  51. package/dist/templates/components/Docs.d.ts +1 -1
  52. package/dist/templates/components/Docs.js +5 -2
  53. package/dist/templates/components/DocsSideBar.d.ts +1 -1
  54. package/dist/templates/components/DocsSideBar.js +3 -1
  55. package/dist/templates/components/SearchDocs.d.ts +1 -1
  56. package/dist/templates/components/SearchDocs.js +17 -3
  57. package/dist/templates/components/SearchModalContent.d.ts +1 -1
  58. package/dist/templates/components/SearchModalContent.js +22 -14
  59. package/dist/templates/components/SectionNavProvider.d.ts +1 -1
  60. package/dist/templates/components/SectionNavProvider.js +32 -20
  61. package/dist/templates/components/SideBar.d.ts +1 -1
  62. package/dist/templates/components/SideBar.js +26 -12
  63. package/dist/templates/components/layout/ActionBar.d.ts +1 -1
  64. package/dist/templates/components/layout/ActionBar.js +9 -7
  65. package/dist/templates/components/layout/Code.d.ts +1 -1
  66. package/dist/templates/components/layout/Code.js +6 -3
  67. package/dist/templates/components/layout/DocsComponents.d.ts +1 -1
  68. package/dist/templates/components/layout/DocsComponents.js +38 -5
  69. package/dist/templates/components/layout/DocsNavigation.d.ts +1 -1
  70. package/dist/templates/components/layout/DocsNavigation.js +4 -2
  71. package/dist/templates/components/layout/Dropdown.d.ts +1 -0
  72. package/dist/templates/components/layout/Dropdown.js +308 -0
  73. package/dist/templates/components/layout/FocusModeToggle.d.ts +1 -1
  74. package/dist/templates/components/layout/FocusModeToggle.js +7 -4
  75. package/dist/templates/components/layout/Footer.d.ts +1 -1
  76. package/dist/templates/components/layout/Footer.js +4 -2
  77. package/dist/templates/components/layout/Header.d.ts +1 -1
  78. package/dist/templates/components/layout/Header.js +18 -8
  79. package/dist/templates/components/layout/SectionBar.d.ts +1 -1
  80. package/dist/templates/components/layout/SectionBar.js +16 -10
  81. package/dist/templates/components/layout/VariantSwitchers.d.ts +1 -0
  82. package/dist/templates/components/layout/VariantSwitchers.js +313 -0
  83. package/dist/templates/components/useStrings.d.ts +1 -0
  84. package/dist/templates/components/useStrings.js +10 -0
  85. package/dist/templates/components/useVariant.d.ts +1 -0
  86. package/dist/templates/components/useVariant.js +13 -0
  87. package/dist/templates/llms/llmsIndex.d.ts +13 -0
  88. package/dist/templates/llms/llmsIndex.js +18 -3
  89. package/dist/templates/mdx/ai-assistant.mdx.d.ts +1 -1
  90. package/dist/templates/mdx/ai-assistant.mdx.js +2 -0
  91. package/dist/templates/mdx/api-playground.mdx.d.ts +1 -1
  92. package/dist/templates/mdx/api-playground.mdx.js +2 -0
  93. package/dist/templates/mdx/commands.mdx.d.ts +1 -1
  94. package/dist/templates/mdx/commands.mdx.js +1 -1
  95. package/dist/templates/mdx/fonts.mdx.d.ts +1 -1
  96. package/dist/templates/mdx/fonts.mdx.js +1 -1
  97. package/dist/templates/mdx/footer-links.mdx.d.ts +1 -1
  98. package/dist/templates/mdx/footer-links.mdx.js +1 -1
  99. package/dist/templates/mdx/index.mdx.d.ts +1 -1
  100. package/dist/templates/mdx/index.mdx.js +2 -0
  101. package/dist/templates/mdx/languages.mdx.d.ts +1 -0
  102. package/dist/templates/mdx/languages.mdx.js +94 -0
  103. package/dist/templates/mdx/media-and-assets.mdx.d.ts +1 -1
  104. package/dist/templates/mdx/media-and-assets.mdx.js +1 -1
  105. package/dist/templates/mdx/model-context-protocol.mdx.d.ts +1 -1
  106. package/dist/templates/mdx/model-context-protocol.mdx.js +6 -0
  107. package/dist/templates/mdx/navigation.mdx.d.ts +1 -1
  108. package/dist/templates/mdx/navigation.mdx.js +2 -0
  109. package/dist/templates/mdx/platform/ai-assistant.mdx.d.ts +1 -1
  110. package/dist/templates/mdx/platform/ai-assistant.mdx.js +2 -0
  111. package/dist/templates/mdx/platform/api-playground.mdx.d.ts +1 -1
  112. package/dist/templates/mdx/platform/api-playground.mdx.js +2 -0
  113. package/dist/templates/mdx/platform/file-editor.mdx.d.ts +1 -1
  114. package/dist/templates/mdx/platform/file-editor.mdx.js +2 -0
  115. package/dist/templates/mdx/platform/index.mdx.d.ts +1 -1
  116. package/dist/templates/mdx/platform/index.mdx.js +1 -1
  117. package/dist/templates/mdx/platform/languages.mdx.d.ts +1 -0
  118. package/dist/templates/mdx/platform/languages.mdx.js +50 -0
  119. package/dist/templates/mdx/platform/mcp.mdx.d.ts +1 -1
  120. package/dist/templates/mdx/platform/mcp.mdx.js +2 -0
  121. package/dist/templates/mdx/platform/navigation-settings.mdx.d.ts +1 -1
  122. package/dist/templates/mdx/platform/navigation-settings.mdx.js +2 -0
  123. package/dist/templates/mdx/platform/publishing.mdx.d.ts +1 -1
  124. package/dist/templates/mdx/platform/publishing.mdx.js +4 -0
  125. package/dist/templates/mdx/platform/self-updating-docs.mdx.d.ts +1 -1
  126. package/dist/templates/mdx/platform/self-updating-docs.mdx.js +2 -0
  127. package/dist/templates/mdx/platform/versions.mdx.d.ts +1 -0
  128. package/dist/templates/mdx/platform/versions.mdx.js +33 -0
  129. package/dist/templates/mdx/sections.mdx.d.ts +1 -1
  130. package/dist/templates/mdx/sections.mdx.js +1 -1
  131. package/dist/templates/mdx/theme.mdx.d.ts +1 -1
  132. package/dist/templates/mdx/theme.mdx.js +1 -1
  133. package/dist/templates/mdx/versions.mdx.d.ts +1 -0
  134. package/dist/templates/mdx/versions.mdx.js +78 -0
  135. package/dist/templates/mdx/what-is-doccupine.mdx.d.ts +1 -1
  136. package/dist/templates/mdx/what-is-doccupine.mdx.js +1 -1
  137. package/dist/templates/prettierignore.d.ts +1 -1
  138. package/dist/templates/prettierignore.js +2 -0
  139. package/dist/templates/services/mcp/server.d.ts +1 -1
  140. package/dist/templates/services/mcp/server.js +54 -10
  141. package/dist/templates/services/mcp/tools.d.ts +1 -1
  142. package/dist/templates/services/mcp/tools.js +81 -6
  143. package/dist/templates/services/mcp/types.d.ts +1 -1
  144. package/dist/templates/services/mcp/types.js +10 -0
  145. package/dist/templates/services/search.d.ts +1 -1
  146. package/dist/templates/services/search.js +34 -4
  147. package/dist/templates/utils/orderNavItems.d.ts +1 -1
  148. package/dist/templates/utils/orderNavItems.js +2 -0
  149. package/dist/templates/utils/strings.d.ts +1 -0
  150. package/dist/templates/utils/strings.js +27 -0
  151. package/dist/templates/utils/variants.d.ts +1 -0
  152. package/dist/templates/utils/variants.js +170 -0
  153. package/package.json +1 -1
@@ -56,6 +56,8 @@ Press **Generate API pages** to create one page per operation from your spec. Ea
56
56
 
57
57
  Alongside them you get an **API Reference** landing page at the section root, listing every endpoint as a card with its method and path. It is a normal page like any other, so you can edit it, add an introduction, or delete it if you would rather write your own.
58
58
 
59
+ The generated pages always land in the default language and version; the reference is neither translated nor versioned.
60
+
59
61
  Generation reads the committed spec, so save and commit your configuration first. Endpoints are shown with a colored HTTP-method badge so they are easy to scan in the file list.
60
62
 
61
63
  ## Sending requests
@@ -1 +1 @@
1
- export declare const platformFileEditorMdxTemplate = "---\ntitle: \"File Editor\"\ndescription: \"Browse, create, and edit your documentation files directly in the browser.\"\ndate: \"2026-02-19\"\ncategory: \"Editing\"\ncategoryOrder: 1\ncategoryIcon: \"pencil\"\norder: 0\nsection: \"Platform\"\n---\n# File Editor\n\nThe file editor is the main workspace for your documentation project. It provides a browser-based file explorer and editor for working with your MDX files and assets.\n\n## File explorer\n\nThe left panel has three tabs:\n\n- **Files** - browse your repository's file tree, create and manage files and directories\n- **Media** - browse directories and manage uploaded images and binary assets\n- **Navigation** - open the [Navigation Builder](/platform/navigation-settings) to configure your sidebar structure with drag-and-drop\n\nIn the Files tab, you can:\n\n- **Browse** directories and files\n- **Create** new files and directories\n- **Rename** and **delete** existing files\n- **Upload** binary assets like images, favicons, and font files\n\nClick any file to open it in the editor panel.\n\n## Editing files\n\nThe editor supports MDX files with full syntax highlighting. Changes you make are saved as **pending changes** - they aren't committed to your repository until you publish.\n\n<Callout type=\"note\">\n Pending changes are stored in Doccupine's database, not in your Git repository. This means you can make edits across multiple sessions before publishing.\n</Callout>\n\n## Inserting components\n\nYou don't have to remember the syntax for every component. There are three ways to insert one, and they all produce the same snippet.\n\n**The Insert component menu.** In the editor toolbar, open the component menu and pick from the grouped list. The snippet is inserted at your cursor, or appended to the end of the document if you haven't placed a cursor yet.\n\n**The `/` shortcut.** Type `/` on an empty line or after a space and the same menu opens at your cursor. Choose a component and it replaces the `/`. If you keep typing instead, the menu disappears and your text is left alone, so a `/` in a URL or a date never gets in the way.\n\n**Autocomplete.** Type `<` and a list of components appears. Keep typing to filter it.\n\nWhichever you use, the editor scrolls the new component into view and places your cursor inside it, ready to fill in.\n\n<Callout type=\"tip\">\n The menu only offers components that are valid on their own. Ones that must live inside a parent, like `<Step>` inside `<Steps>`, stay in the `<` autocomplete instead, so you can reach them while filling out a list.\n</Callout>\n\n## Live preview\n\nThe editor has three modes: **Code**, **Split**, and **Preview**. Split shows your source and the rendered result side by side.\n\nThe preview renders your document the way your published site will:\n\n- **Components** render as themselves, not as raw tags\n- **Images** resolve from your repository, so `![Logo](/logo.png)` shows the file from your `public` directory. Relative paths like `./diagram.png` resolve against the document's own directory, and images you've uploaded but not yet published appear too\n- **Mermaid diagrams** render as diagrams rather than code blocks\n\nIf a component is missing or a diagram can't be parsed, the preview says so in place rather than failing, so you can see what went wrong and keep editing.\n\n## Media directories\n\nThe **Media** tab browses directories, not just a flat list. Click a directory to open it, and use the breadcrumb to go back.\n\n- **New directory** creates a directory in the directory you're currently viewing\n- **Uploads** go into the directory you're viewing, not always the top level\n- **Copy path** gives you the path to paste into MDX, relative to your site root\n\n<Callout type=\"note\">\n Git can't store an empty directory, so a new directory holds a hidden placeholder file until you add something to it. You'll never see the placeholder in the Media tab.\n</Callout>\n\n## Version history\n\nFor any file, you can view its commit history to see how it has changed over time. This lets you:\n\n- See when changes were made and what the commit messages were\n- View the file's content at any previous commit\n- Compare past versions to understand what changed\n\n## Binary files\n\nYou can upload images and other binary assets (PNG, JPG, SVG, WOFF2, etc.) directly through the file explorer. These are stored temporarily in Doccupine's storage and committed to your repository when you publish.\n\n## Read-only mode\n\nTeam members with the **Viewer** or **Billing** role can browse files but cannot make edits. The editor will display content in read-only mode for these users.";
1
+ export declare const platformFileEditorMdxTemplate = "---\ntitle: \"File Editor\"\ndescription: \"Browse, create, and edit your documentation files directly in the browser.\"\ndate: \"2026-02-19\"\ncategory: \"Editing\"\ncategoryOrder: 1\ncategoryIcon: \"pencil\"\norder: 0\nsection: \"Platform\"\n---\n# File Editor\n\nThe file editor is the main workspace for your documentation project. It provides a browser-based file explorer and editor for working with your MDX files and assets.\n\n## File explorer\n\nThe left panel has three tabs:\n\n- **Files** - browse your repository's file tree, create and manage files and directories\n- **Media** - browse directories and manage uploaded images and binary assets\n- **Navigation** - open the [Navigation Builder](/platform/navigation-settings) to configure your sidebar structure with drag-and-drop\n\nIn the Files tab, you can:\n\n- **Browse** directories and files\n- **Create** new files and directories\n- **Rename** and **delete** existing files\n- **Upload** binary assets like images, favicons, and font files\n\nOn a project with [languages](/platform/languages) or [versions](/platform/versions), a selector above the tree scopes it to one language and version at a time; the other variant folders stay out of view until you switch.\n\nClick any file to open it in the editor panel.\n\n## Editing files\n\nThe editor supports MDX files with full syntax highlighting. Changes you make are saved as **pending changes** - they aren't committed to your repository until you publish.\n\n<Callout type=\"note\">\n Pending changes are stored in Doccupine's database, not in your Git repository. This means you can make edits across multiple sessions before publishing.\n</Callout>\n\n## Inserting components\n\nYou don't have to remember the syntax for every component. There are three ways to insert one, and they all produce the same snippet.\n\n**The Insert component menu.** In the editor toolbar, open the component menu and pick from the grouped list. The snippet is inserted at your cursor, or appended to the end of the document if you haven't placed a cursor yet.\n\n**The `/` shortcut.** Type `/` on an empty line or after a space and the same menu opens at your cursor. Choose a component and it replaces the `/`. If you keep typing instead, the menu disappears and your text is left alone, so a `/` in a URL or a date never gets in the way.\n\n**Autocomplete.** Type `<` and a list of components appears. Keep typing to filter it.\n\nWhichever you use, the editor scrolls the new component into view and places your cursor inside it, ready to fill in.\n\n<Callout type=\"tip\">\n The menu only offers components that are valid on their own. Ones that must live inside a parent, like `<Step>` inside `<Steps>`, stay in the `<` autocomplete instead, so you can reach them while filling out a list.\n</Callout>\n\n## Live preview\n\nThe editor has three modes: **Code**, **Split**, and **Preview**. Split shows your source and the rendered result side by side.\n\nThe preview renders your document the way your published site will:\n\n- **Components** render as themselves, not as raw tags\n- **Images** resolve from your repository, so `![Logo](/logo.png)` shows the file from your `public` directory. Relative paths like `./diagram.png` resolve against the document's own directory, and images you've uploaded but not yet published appear too\n- **Mermaid diagrams** render as diagrams rather than code blocks\n\nIf a component is missing or a diagram can't be parsed, the preview says so in place rather than failing, so you can see what went wrong and keep editing.\n\n## Media directories\n\nThe **Media** tab browses directories, not just a flat list. Click a directory to open it, and use the breadcrumb to go back.\n\n- **New directory** creates a directory in the directory you're currently viewing\n- **Uploads** go into the directory you're viewing, not always the top level\n- **Copy path** gives you the path to paste into MDX, relative to your site root\n\n<Callout type=\"note\">\n Git can't store an empty directory, so a new directory holds a hidden placeholder file until you add something to it. You'll never see the placeholder in the Media tab.\n</Callout>\n\n## Version history\n\nFor any file, you can view its commit history to see how it has changed over time. This lets you:\n\n- See when changes were made and what the commit messages were\n- View the file's content at any previous commit\n- Compare past versions to understand what changed\n\n## Binary files\n\nYou can upload images and other binary assets (PNG, JPG, SVG, WOFF2, etc.) directly through the file explorer. These are stored temporarily in Doccupine's storage and committed to your repository when you publish.\n\n## Read-only mode\n\nTeam members with the **Viewer** or **Billing** role can browse files but cannot make edits. The editor will display content in read-only mode for these users.";
@@ -27,6 +27,8 @@ In the Files tab, you can:
27
27
  - **Rename** and **delete** existing files
28
28
  - **Upload** binary assets like images, favicons, and font files
29
29
 
30
+ On a project with [languages](/platform/languages) or [versions](/platform/versions), a selector above the tree scopes it to one language and version at a time; the other variant folders stay out of view until you switch.
31
+
30
32
  Click any file to open it in the editor panel.
31
33
 
32
34
  ## Editing files
@@ -1 +1 @@
1
- export declare const platformIndexMdxTemplate = "---\ntitle: \"Platform Overview\"\ndescription: \"Learn how to use the Doccupine platform to create, customize, and deploy documentation websites.\"\ndate: \"2026-02-19\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\ncategoryIcon: \"rocket\"\norder: 0\nsection: \"Platform\"\n---\n# Platform Overview\n\nThe Doccupine platform gives you everything you need to create, customize, and host beautiful documentation websites - all from your browser. No local setup, no CI pipelines, no infrastructure to manage.\n\n## What you get\n\n- **Browser-based editor** for writing and managing your documentation files\n- **One-click publishing** that commits to GitHub and deploys automatically\n- **Agent Sync** to link pages to the code they document and rewrite them when it changes\n- **Visual configuration** for themes, navigation, fonts, links, and more\n- **Custom domains** with automatic HTTPS\n- **AI assistant** built into every deployed site\n- **Team collaboration** with role-based access control\n\n## How it works\n\nDoccupine connects two core pieces behind the scenes:\n\n1. **GitHub** stores your documentation source files in a Git repository\n2. **Doccupine** builds, hosts, and serves your site globally - plus provides a dashboard for editing, configuring, and managing your project\n\nYou write MDX files, configure your site through visual settings pages, and hit Publish. Doccupine handles the rest.\n\n## Getting started\n\n1. **Sign up** at Doccupine and start your free 30-day trial - no credit card required.\n2. **Create a project** from the dashboard. Choose between a managed repository or connecting your own GitHub account.\n3. **Edit your docs** using the built-in file explorer and editor.\n4. **Configure your site** through the settings pages - theme, navigation, fonts, and more.\n5. **Publish** your changes with a single click.\n\n<Callout type=\"success\">\n Your documentation site is live the moment you create a project. Doccupine deploys a starter site automatically so you can see results immediately.\n</Callout>\n\n## Dashboard\n\nAfter signing in, the dashboard shows all your projects. You'll see two sections:\n\n- **Your Projects** - documentation sites you own, plus a button to create new ones\n- **Shared Projects** - sites that other users have invited you to collaborate on\n\nClick any project card to open it and start working.\n\n<Columns cols={2}>\n <Card title=\"Sign Up\" icon=\"user-plus\" href=\"https://doccupine.com/sign-up\">\n Create your free account and start building documentation in minutes.\n </Card>\n <Card title=\"Sign In\" icon=\"log-in\" href=\"https://doccupine.com/sign-in\">\n Already have an account? Sign in to your dashboard.\n </Card>\n</Columns>";
1
+ export declare const platformIndexMdxTemplate = "---\ntitle: \"Platform Overview\"\ndescription: \"Learn how to use the Doccupine platform to create, customize, and deploy documentation websites.\"\ndate: \"2026-02-19\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\ncategoryIcon: \"rocket\"\norder: 0\nsection: \"Platform\"\n---\n# Platform Overview\n\nThe Doccupine platform gives you everything you need to create, customize, and host beautiful documentation websites - all from your browser. No local setup, no CI pipelines, no infrastructure to manage.\n\n## What you get\n\n- **Browser-based editor** for writing and managing your documentation files\n- **One-click publishing** that commits to GitHub and deploys automatically\n- **Agent Sync** to link pages to the code they document and rewrite them when it changes\n- **Visual configuration** for themes, navigation, fonts, links, languages, versions, and more\n- **Custom domains** with automatic HTTPS\n- **AI assistant** built into every deployed site\n- **Team collaboration** with role-based access control\n\n## How it works\n\nDoccupine connects two core pieces behind the scenes:\n\n1. **GitHub** stores your documentation source files in a Git repository\n2. **Doccupine** builds, hosts, and serves your site globally - plus provides a dashboard for editing, configuring, and managing your project\n\nYou write MDX files, configure your site through visual settings pages, and hit Publish. Doccupine handles the rest.\n\n## Getting started\n\n1. **Sign up** at Doccupine and start your free 30-day trial - no credit card required.\n2. **Create a project** from the dashboard. Choose between a managed repository or connecting your own GitHub account.\n3. **Edit your docs** using the built-in file explorer and editor.\n4. **Configure your site** through the settings pages - theme, navigation, fonts, and more.\n5. **Publish** your changes with a single click.\n\n<Callout type=\"success\">\n Your documentation site is live the moment you create a project. Doccupine deploys a starter site automatically so you can see results immediately.\n</Callout>\n\n## Dashboard\n\nAfter signing in, the dashboard shows all your projects. You'll see two sections:\n\n- **Your Projects** - documentation sites you own, plus a button to create new ones\n- **Shared Projects** - sites that other users have invited you to collaborate on\n\nClick any project card to open it and start working.\n\n<Columns cols={2}>\n <Card title=\"Sign Up\" icon=\"user-plus\" href=\"https://doccupine.com/sign-up\">\n Create your free account and start building documentation in minutes.\n </Card>\n <Card title=\"Sign In\" icon=\"log-in\" href=\"https://doccupine.com/sign-in\">\n Already have an account? Sign in to your dashboard.\n </Card>\n</Columns>";
@@ -17,7 +17,7 @@ The Doccupine platform gives you everything you need to create, customize, and h
17
17
  - **Browser-based editor** for writing and managing your documentation files
18
18
  - **One-click publishing** that commits to GitHub and deploys automatically
19
19
  - **Agent Sync** to link pages to the code they document and rewrite them when it changes
20
- - **Visual configuration** for themes, navigation, fonts, links, and more
20
+ - **Visual configuration** for themes, navigation, fonts, links, languages, versions, and more
21
21
  - **Custom domains** with automatic HTTPS
22
22
  - **AI assistant** built into every deployed site
23
23
  - **Team collaboration** with role-based access control
@@ -0,0 +1 @@
1
+ export declare const platformLanguagesMdxTemplate = "---\ntitle: \"Languages\"\ndescription: \"Add translations to your documentation from the dashboard: declare languages, copy pages into a language, and translate them with AI.\"\ndate: \"2026-09-08\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 6\nsection: \"Platform\"\n---\n# Languages\n\nThe **Languages** page under a project's settings manages the project's `languages.json` and the language folders in its repository. It is the dashboard counterpart of the CLI's [Languages](/languages) feature, and it stages everything as pending changes for you to review and [publish](/platform/publishing).\n\n## Enabling languages\n\nTurn on **Enable languages** and name the default language (its code, such as `en`, and its label). Saving writes a `languages.json` with that single entry. Nothing moves: the default language's pages stay at the root of the docs folder.\n\n## Adding a language\n\nClick **Add language**, enter the language code and label, and choose how to start:\n\n- **Empty**: only a starter `index.mdx` is created in the new language folder.\n- **Start from a copy of the default language**: every page of the default language is copied into the language folder as a starting point for translation.\n\nBoth options stage the new files and the updated `languages.json`; they reach the live site when you publish.\n\n## Translating pages\n\nWith at least two languages configured, the file editor's action bar offers **Translate to** on every page of the default language. It translates the page with the project's AI configuration, keeps code blocks, components, links, and frontmatter keys intact, and stages the result in the target language folder. When a translation already exists you are asked before it is replaced.\n\nThe Languages page also offers **Translate missing pages** for each language, which translates the default-language pages that have no counterpart yet, up to 25 pages per run, with progress and a cancel button. Translation is billed like every other AI feature of the project.\n\n## Editing translations\n\nThe file explorer shows a language selector when languages are configured, so you work inside one language at a time. Translated pages are ordinary MDX files: the [file editor](/platform/file-editor), preview, and version history work the same way.\n\n## Site text\n\nEach language card has a **Site text** button that opens the site's own labels for that language: the search box and its messages, the navigation and page actions, the AI assistant's greeting and prompts, the footer, and the language and version switchers. Every label shows its English default; type a translation to override it and clear the field to fall back. The dialog groups the labels by area, and a label that carries a placeholder such as `{count}` reminds you to keep it. The button shows how many labels the language overrides.\n\nApplying the dialog updates the language's `strings` object in `languages.json`; save the page to stage it. See the CLI's [Languages](/languages#interface-strings) page for the full list of keys.\n\n## Removing a language\n\nRemoving a language from the list asks whether its pages should be deleted too. The removal, the deleted pages, and the updated `languages.json` are staged together and appear in the Publish dialog.\n\n## Rules\n\nA language code must be a lowercase URL segment and must not collide with a section slug, a version slug, or a reserved route segment. The page refuses a collision when you save, and the Publish dialog refuses a change set that would stop the site build.\n";
@@ -0,0 +1,50 @@
1
+ export const platformLanguagesMdxTemplate = `---
2
+ title: "Languages"
3
+ description: "Add translations to your documentation from the dashboard: declare languages, copy pages into a language, and translate them with AI."
4
+ date: "2026-09-08"
5
+ category: "Configuration"
6
+ categoryOrder: 2
7
+ order: 6
8
+ section: "Platform"
9
+ ---
10
+ # Languages
11
+
12
+ The **Languages** page under a project's settings manages the project's \`languages.json\` and the language folders in its repository. It is the dashboard counterpart of the CLI's [Languages](/languages) feature, and it stages everything as pending changes for you to review and [publish](/platform/publishing).
13
+
14
+ ## Enabling languages
15
+
16
+ Turn on **Enable languages** and name the default language (its code, such as \`en\`, and its label). Saving writes a \`languages.json\` with that single entry. Nothing moves: the default language's pages stay at the root of the docs folder.
17
+
18
+ ## Adding a language
19
+
20
+ Click **Add language**, enter the language code and label, and choose how to start:
21
+
22
+ - **Empty**: only a starter \`index.mdx\` is created in the new language folder.
23
+ - **Start from a copy of the default language**: every page of the default language is copied into the language folder as a starting point for translation.
24
+
25
+ Both options stage the new files and the updated \`languages.json\`; they reach the live site when you publish.
26
+
27
+ ## Translating pages
28
+
29
+ With at least two languages configured, the file editor's action bar offers **Translate to** on every page of the default language. It translates the page with the project's AI configuration, keeps code blocks, components, links, and frontmatter keys intact, and stages the result in the target language folder. When a translation already exists you are asked before it is replaced.
30
+
31
+ The Languages page also offers **Translate missing pages** for each language, which translates the default-language pages that have no counterpart yet, up to 25 pages per run, with progress and a cancel button. Translation is billed like every other AI feature of the project.
32
+
33
+ ## Editing translations
34
+
35
+ The file explorer shows a language selector when languages are configured, so you work inside one language at a time. Translated pages are ordinary MDX files: the [file editor](/platform/file-editor), preview, and version history work the same way.
36
+
37
+ ## Site text
38
+
39
+ Each language card has a **Site text** button that opens the site's own labels for that language: the search box and its messages, the navigation and page actions, the AI assistant's greeting and prompts, the footer, and the language and version switchers. Every label shows its English default; type a translation to override it and clear the field to fall back. The dialog groups the labels by area, and a label that carries a placeholder such as \`{count}\` reminds you to keep it. The button shows how many labels the language overrides.
40
+
41
+ Applying the dialog updates the language's \`strings\` object in \`languages.json\`; save the page to stage it. See the CLI's [Languages](/languages#interface-strings) page for the full list of keys.
42
+
43
+ ## Removing a language
44
+
45
+ Removing a language from the list asks whether its pages should be deleted too. The removal, the deleted pages, and the updated \`languages.json\` are staged together and appear in the Publish dialog.
46
+
47
+ ## Rules
48
+
49
+ A language code must be a lowercase URL segment and must not collide with a section slug, a version slug, or a reserved route segment. The page refuses a collision when you save, and the Publish dialog refuses a change set that would stop the site build.
50
+ `;
@@ -1 +1 @@
1
- export declare const platformMcpMdxTemplate = "---\ntitle: \"MCP\"\ndescription: \"Connect external AI apps like Claude and Cursor to your documentation with a Model Context Protocol server, and protect it with an API key.\"\ndate: \"2026-07-12\"\nupdated: \"2026-07-30\"\ncategory: \"AI & Integrations\"\ncategoryOrder: 3\norder: 1\nsection: \"Platform\"\n---\n# MCP\n\nThe **MCP** settings page lets external AI applications connect to your documentation through a hosted Model Context Protocol (MCP) server. Every Doccupine site exposes an MCP endpoint at `/api/mcp` that AI tools can query to search and read your content.\n\n## Connect your site with AI apps\n\nThe **Connect your site with AI apps** card gives you a ready-to-paste MCP configuration for popular AI tools. Pick a tab, copy the snippet, and add it to that tool's MCP config:\n\n- **Claude** - add the configuration to Claude Desktop's `claude_desktop_config.json`, or add the server URL as a connector from Claude's settings.\n- **Cursor** - add the configuration to Cursor's `~/.cursor/mcp.json`, or connect it from Cursor's MCP settings.\n- **Others** - a generic `mcpServers` block for any MCP-compatible application.\n\nEvery snippet points to your site's own MCP endpoint, for example:\n\n```json\n{\n \"mcpServers\": {\n \"Your Project\": { \"url\": \"https://your-site.com/api/mcp\" }\n }\n}\n```\n\n<Callout type=\"note\">\n The connection snippet appears once your site has been deployed. If you haven't published yet, deploy your site first to get its MCP server URL.\n</Callout>\n\n## MCP server authentication\n\nOn a public site, the MCP endpoint is publicly accessible by default. When the site is [password protected](/platform/authentication), MCP requires the same session unless you configure its dedicated API key:\n\n1. Enable **Require API key for MCP access**.\n2. Enter an API key.\n3. Save.\n\nOnce enabled, clients must include the key as a Bearer token in the `Authorization` header of every request to `/api/mcp`.\n\n<Callout type=\"warning\">\n The API key is stored as an environment variable (`DOCS_API_KEY`) on your deployment, not in a JSON file. After saving, a redeploy is triggered automatically to apply the change.\n</Callout>\n\n<Callout type=\"note\">\n For the full reference on how the MCP server works - available tools, rate limits, and endpoint details - see the [Model Context Protocol documentation](/model-context-protocol).\n</Callout>";
1
+ export declare const platformMcpMdxTemplate = "---\ntitle: \"MCP\"\ndescription: \"Connect external AI apps like Claude and Cursor to your documentation with a Model Context Protocol server, and protect it with an API key.\"\ndate: \"2026-07-12\"\nupdated: \"2026-07-30\"\ncategory: \"AI & Integrations\"\ncategoryOrder: 3\norder: 1\nsection: \"Platform\"\n---\n# MCP\n\nThe **MCP** settings page lets external AI applications connect to your documentation through a hosted Model Context Protocol (MCP) server. Every Doccupine site exposes an MCP endpoint at `/api/mcp` that AI tools can query to search and read your content.\n\nOn a site with [languages](/platform/languages) or [versions](/platform/versions), the server's `search_docs` and `list_docs` tools accept `language` and `version` parameters and answer from the default language and version when they are left out.\n\n## Connect your site with AI apps\n\nThe **Connect your site with AI apps** card gives you a ready-to-paste MCP configuration for popular AI tools. Pick a tab, copy the snippet, and add it to that tool's MCP config:\n\n- **Claude** - add the configuration to Claude Desktop's `claude_desktop_config.json`, or add the server URL as a connector from Claude's settings.\n- **Cursor** - add the configuration to Cursor's `~/.cursor/mcp.json`, or connect it from Cursor's MCP settings.\n- **Others** - a generic `mcpServers` block for any MCP-compatible application.\n\nEvery snippet points to your site's own MCP endpoint, for example:\n\n```json\n{\n \"mcpServers\": {\n \"Your Project\": { \"url\": \"https://your-site.com/api/mcp\" }\n }\n}\n```\n\n<Callout type=\"note\">\n The connection snippet appears once your site has been deployed. If you haven't published yet, deploy your site first to get its MCP server URL.\n</Callout>\n\n## MCP server authentication\n\nOn a public site, the MCP endpoint is publicly accessible by default. When the site is [password protected](/platform/authentication), MCP requires the same session unless you configure its dedicated API key:\n\n1. Enable **Require API key for MCP access**.\n2. Enter an API key.\n3. Save.\n\nOnce enabled, clients must include the key as a Bearer token in the `Authorization` header of every request to `/api/mcp`.\n\n<Callout type=\"warning\">\n The API key is stored as an environment variable (`DOCS_API_KEY`) on your deployment, not in a JSON file. After saving, a redeploy is triggered automatically to apply the change.\n</Callout>\n\n<Callout type=\"note\">\n For the full reference on how the MCP server works - available tools, rate limits, and endpoint details - see the [Model Context Protocol documentation](/model-context-protocol).\n</Callout>";
@@ -12,6 +12,8 @@ section: "Platform"
12
12
 
13
13
  The **MCP** settings page lets external AI applications connect to your documentation through a hosted Model Context Protocol (MCP) server. Every Doccupine site exposes an MCP endpoint at \`/api/mcp\` that AI tools can query to search and read your content.
14
14
 
15
+ On a site with [languages](/platform/languages) or [versions](/platform/versions), the server's \`search_docs\` and \`list_docs\` tools accept \`language\` and \`version\` parameters and answer from the default language and version when they are left out.
16
+
15
17
  ## Connect your site with AI apps
16
18
 
17
19
  The **Connect your site with AI apps** card gives you a ready-to-paste MCP configuration for popular AI tools. Pick a tab, copy the snippet, and add it to that tool's MCP config:
@@ -1 +1 @@
1
- export declare const platformNavigationSettingsMdxTemplate = "---\ntitle: \"Navigation Settings\"\ndescription: \"Define the sidebar structure for your documentation site using the drag-and-drop Navigation Builder.\"\ndate: \"2026-07-06\"\nupdated: \"2026-07-30\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 2\nsection: \"Platform\"\n---\n# Navigation Settings\n\nThe Navigation Builder lets you define your sidebar structure through a visual, drag-and-drop interface. It lives inside the **File Explorer** as a dedicated **Navigation** tab, alongside the Files and Media tabs.\n\n## Structure\n\nNavigation is organized into these levels:\n\n- **Section** - a top-level area of your site (e.g., \"Docs\", \"API Reference\"). Each section appears as a tab below the site header and has its own sidebar. Sections are defined by a label, URL slug, and docs directory.\n- **Category** - a group label within a section's sidebar (e.g., \"Getting Started\"). Categories can have an optional icon.\n- **Link** - an individual page entry within a category, defined by a slug and title, with an optional icon.\n- **Group** - a link that holds its own nested links, rendered as a collapsible item in the sidebar. Groups can nest as deep as you need. See [Nested groups](#nested-groups).\n\n## Drag-and-drop reordering\n\nYou can reorder items at every level by dragging their handles:\n\n- **Drag categories** between sections or within the same section to change their position\n- **Drag links** between categories or within the same category to reorder them\n\n## Managing sections\n\n- Click **Add Section** in the toolbar to create a new section. Fill in the label, slug, and directory fields.\n- Click the **edit** button on a section header to open its edit modal, where you can update the label, slug, and directory.\n- Delete a section from its edit modal using the delete button. The root section cannot be deleted.\n\n### Slug rules\n\nA section slug becomes a URL segment, so it has to look like one: lowercase letters, numbers, and dashes, with no slashes and no spaces. \"API Reference\" is a fine section **label**, but its slug is `api-reference`. Each label and each slug must also be unique across your sections.\n\nDoccupine refuses to save a section list that breaks these rules, and tells you which entry is wrong. It is worth being strict about: the site build does not repair an invalid `sections.json`, it ignores the file completely, which would quietly collapse every section on your deployed site into one.\n\n### The default section\n\nOne section should have an empty slug (`\"\"`). This is the default/root section that serves pages at the root URL. Pages not assigned to any other section belong here. Only one section can use it.\n\n### Frontmatter-based sections\n\nYou can also define sections purely through page frontmatter without using the Navigation Builder. Add a `section` field to your MDX frontmatter and Doccupine will create sections automatically. See the [Sections documentation](/sections) for details.\n\n<Callout type=\"note\">\n Frontmatter section names turn into slugs the same way, so two names that differ only in spelling or capitalization - \"API Reference\" and \"api-reference\" - collide on one URL and stop the build. Use one spelling across your pages, or define the sections explicitly here.\n</Callout>\n\n## Managing categories\n\n- Click **Add Category** within a section to create a new group\n- Click the **edit** button on a category to open its **Edit Category** modal, where you can rename it, pick an icon, or delete it\n\n## Adding links\n\nWithin each category, click **Add files** to open a popover that lists available MDX files not yet included in the navigation. You can:\n\n- **Search** by file name to filter the list\n- **Select** one or more files using checkboxes\n- Click **Add** to insert them as links in the category\n\n### Editing a link\n\n- **Double-click** a link's title to rename it inline.\n- Click the **edit** button on a link to open the **Edit Link** modal, where you can change its title, slug, and icon. Leaving the slug empty makes a leaf link point at the index page; for a group it makes the group a non-clickable label.\n- Click the **delete** button next to a link to remove it.\n\n## Icons\n\nYou can show a [Lucide](https://lucide.dev/icons) icon next to any category or link to make the sidebar easier to scan.\n\n- Set a **category icon** from the Edit Category modal.\n- Set a **link icon** from the Edit Link modal.\n\nBoth use a searchable icon picker, and icon names are stored in kebab-case (e.g. `rocket`, `book-open`, `settings`). You can also set icons from page frontmatter using the `navIcon` (link) and `categoryIcon` (category) fields, which the **Regenerate** button picks up.\n\n## Nested groups\n\nA link can hold its own child links, rendering as a collapsible group in the sidebar. Nesting can go as deep as you need.\n\nThere are two ways to create a group:\n\n- Click **Add group** (in a category or inside another group) to create a collapsible group. Give it a title in the Edit Link modal, then leave its slug empty to make it a plain, non-clickable label, or set a slug to make the group header link to its own page.\n- Click **Add pages inside** on an existing link to nest pages under it. The link keeps its own slug and becomes the group header.\n\nInside a group, use **Add files** to add pages and **Add group** to nest another group. Toggle the chevron on a group to collapse or expand it in the builder.\n\n## Regenerate from files\n\nThe toolbar includes a **Regenerate** button that rebuilds the entire navigation tree from your MDX files' frontmatter (`category`, `categoryOrder`, `order`, `navIcon`, and `categoryIcon` fields). A confirmation modal appears before any existing manual navigation is replaced.\n\n<Callout type=\"warning\">\n Regenerating from files replaces your current navigation structure. This cannot be undone.\n</Callout>\n\n## Auto-generated vs. manual\n\nIf you don't configure navigation at all, Doccupine automatically builds your sidebar from page frontmatter. The Navigation Builder is only needed when you want explicit control over the order and grouping.\n\n## How it works\n\nWhen you save, the Navigation Builder writes two files to your repository as pending changes:\n\n- `navigation.json` - the category and link structure for each section\n- `sections.json` - the list of sections with their labels, slugs, and directories\n\nIcons are written as an `icon` field on a category or link, and nested groups as a `links` array on a link.\n\n**Array format** for single-section sites (`navigation.json`):\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"icon\": \"rocket\",\n \"links\": [\n {\n \"slug\": \"getting-started\",\n \"title\": \"Quick Start\",\n \"icon\": \"book-open\"\n },\n {\n \"title\": \"Guides\",\n \"icon\": \"compass\",\n \"links\": [{ \"slug\": \"guides/deploy\", \"title\": \"Deploying\" }]\n }\n ]\n }\n]\n```\n\n**Object format** for multi-section sites (`navigation.json`):\n\n```json\n{\n \"\": [\n { \"label\": \"General\", \"links\": [{ \"slug\": \"\", \"title\": \"Introduction\" }] }\n ],\n \"api\": [\n {\n \"label\": \"Auth\",\n \"links\": [{ \"slug\": \"api/auth\", \"title\": \"Authentication\" }]\n }\n ]\n}\n```\n\n**Sections** (`sections.json`):\n\n```json\n[\n { \"label\": \"Docs\", \"slug\": \"\" },\n { \"label\": \"API Reference\", \"slug\": \"api\" }\n]\n```";
1
+ export declare const platformNavigationSettingsMdxTemplate = "---\ntitle: \"Navigation Settings\"\ndescription: \"Define the sidebar structure for your documentation site using the drag-and-drop Navigation Builder.\"\ndate: \"2026-07-06\"\nupdated: \"2026-07-30\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 2\nsection: \"Platform\"\n---\n# Navigation Settings\n\nThe Navigation Builder lets you define your sidebar structure through a visual, drag-and-drop interface. It lives inside the **File Explorer** as a dedicated **Navigation** tab, alongside the Files and Media tabs.\n\n## Structure\n\nNavigation is organized into these levels:\n\n- **Section** - a top-level area of your site (e.g., \"Docs\", \"API Reference\"). Each section appears as a tab below the site header and has its own sidebar. Sections are defined by a label, URL slug, and docs directory.\n- **Category** - a group label within a section's sidebar (e.g., \"Getting Started\"). Categories can have an optional icon.\n- **Link** - an individual page entry within a category, defined by a slug and title, with an optional icon.\n- **Group** - a link that holds its own nested links, rendered as a collapsible item in the sidebar. Groups can nest as deep as you need. See [Nested groups](#nested-groups).\n\n## Drag-and-drop reordering\n\nYou can reorder items at every level by dragging their handles:\n\n- **Drag categories** between sections or within the same section to change their position\n- **Drag links** between categories or within the same category to reorder them\n\n## Managing sections\n\n- Click **Add Section** in the toolbar to create a new section. Fill in the label, slug, and directory fields.\n- Click the **edit** button on a section header to open its edit modal, where you can update the label, slug, and directory.\n- Delete a section from its edit modal using the delete button. The root section cannot be deleted.\n\n### Slug rules\n\nA section slug becomes a URL segment, so it has to look like one: lowercase letters, numbers, and dashes, with no slashes and no spaces. \"API Reference\" is a fine section **label**, but its slug is `api-reference`. Each label and each slug must also be unique across your sections.\n\nDoccupine refuses to save a section list that breaks these rules, and tells you which entry is wrong. It is worth being strict about: the site build does not repair an invalid `sections.json`, it ignores the file completely, which would quietly collapse every section on your deployed site into one.\n\n### The default section\n\nOne section should have an empty slug (`\"\"`). This is the default/root section that serves pages at the root URL. Pages not assigned to any other section belong here. Only one section can use it.\n\n### Frontmatter-based sections\n\nYou can also define sections purely through page frontmatter without using the Navigation Builder. Add a `section` field to your MDX frontmatter and Doccupine will create sections automatically. See the [Sections documentation](/sections) for details.\n\n<Callout type=\"note\">\n Frontmatter section names turn into slugs the same way, so two names that differ only in spelling or capitalization - \"API Reference\" and \"api-reference\" - collide on one URL and stop the build. Use one spelling across your pages, or define the sections explicitly here.\n</Callout>\n\n## Managing categories\n\n- Click **Add Category** within a section to create a new group\n- Click the **edit** button on a category to open its **Edit Category** modal, where you can rename it, pick an icon, or delete it\n\n## Adding links\n\nWithin each category, click **Add files** to open a popover that lists available MDX files not yet included in the navigation. You can:\n\n- **Search** by file name to filter the list\n- **Select** one or more files using checkboxes\n- Click **Add** to insert them as links in the category\n\n### Editing a link\n\n- **Double-click** a link's title to rename it inline.\n- Click the **edit** button on a link to open the **Edit Link** modal, where you can change its title, slug, and icon. Leaving the slug empty makes a leaf link point at the index page; for a group it makes the group a non-clickable label.\n- Click the **delete** button next to a link to remove it.\n\n## Icons\n\nYou can show a [Lucide](https://lucide.dev/icons) icon next to any category or link to make the sidebar easier to scan.\n\n- Set a **category icon** from the Edit Category modal.\n- Set a **link icon** from the Edit Link modal.\n\nBoth use a searchable icon picker, and icon names are stored in kebab-case (e.g. `rocket`, `book-open`, `settings`). You can also set icons from page frontmatter using the `navIcon` (link) and `categoryIcon` (category) fields, which the **Regenerate** button picks up.\n\n## Nested groups\n\nA link can hold its own child links, rendering as a collapsible group in the sidebar. Nesting can go as deep as you need.\n\nThere are two ways to create a group:\n\n- Click **Add group** (in a category or inside another group) to create a collapsible group. Give it a title in the Edit Link modal, then leave its slug empty to make it a plain, non-clickable label, or set a slug to make the group header link to its own page.\n- Click **Add pages inside** on an existing link to nest pages under it. The link keeps its own slug and becomes the group header.\n\nInside a group, use **Add files** to add pages and **Add group** to nest another group. Toggle the chevron on a group to collapse or expand it in the builder.\n\n## Regenerate from files\n\nThe toolbar includes a **Regenerate** button that rebuilds the entire navigation tree from your MDX files' frontmatter (`category`, `categoryOrder`, `order`, `navIcon`, and `categoryIcon` fields). A confirmation modal appears before any existing manual navigation is replaced.\n\n<Callout type=\"warning\">\n Regenerating from files replaces your current navigation structure. This cannot be undone.\n</Callout>\n\n## Auto-generated vs. manual\n\nIf you don't configure navigation at all, Doccupine automatically builds your sidebar from page frontmatter. The Navigation Builder is only needed when you want explicit control over the order and grouping.\n\n## How it works\n\nWhen you save, the Navigation Builder writes two files to your repository as pending changes:\n\n- `navigation.json` - the category and link structure for each section\n- `sections.json` - the list of sections with their labels, slugs, and directories\n\nIcons are written as an `icon` field on a category or link, and nested groups as a `links` array on a link.\n\n**Array format** for single-section sites (`navigation.json`):\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"icon\": \"rocket\",\n \"links\": [\n {\n \"slug\": \"getting-started\",\n \"title\": \"Quick Start\",\n \"icon\": \"book-open\"\n },\n {\n \"title\": \"Guides\",\n \"icon\": \"compass\",\n \"links\": [{ \"slug\": \"guides/deploy\", \"title\": \"Deploying\" }]\n }\n ]\n }\n]\n```\n\n**Object format** for multi-section sites (`navigation.json`):\n\n```json\n{\n \"\": [\n { \"label\": \"General\", \"links\": [{ \"slug\": \"\", \"title\": \"Introduction\" }] }\n ],\n \"api\": [\n {\n \"label\": \"Auth\",\n \"links\": [{ \"slug\": \"api/auth\", \"title\": \"Authentication\" }]\n }\n ]\n}\n```\n\nObject keys are URL prefixes. On a project with [languages](/platform/languages) or [versions](/platform/versions), a key can also name a variant scope, such as `\"de\"` for the German root or `\"de/api\"` for the German API section; scopes without a key build their sidebar from frontmatter.\n\n**Sections** (`sections.json`):\n\n```json\n[\n { \"label\": \"Docs\", \"slug\": \"\" },\n { \"label\": \"API Reference\", \"slug\": \"api\" }\n]\n```";
@@ -151,6 +151,8 @@ Icons are written as an \`icon\` field on a category or link, and nested groups
151
151
  }
152
152
  \`\`\`
153
153
 
154
+ Object keys are URL prefixes. On a project with [languages](/platform/languages) or [versions](/platform/versions), a key can also name a variant scope, such as \`"de"\` for the German root or \`"de/api"\` for the German API section; scopes without a key build their sidebar from frontmatter.
155
+
154
156
  **Sections** (\`sections.json\`):
155
157
 
156
158
  \`\`\`json
@@ -1 +1 @@
1
- export declare const platformPublishingMdxTemplate = "---\ntitle: \"Publishing Changes\"\ndescription: \"Commit your edits to GitHub and deploy your documentation site with one click.\"\ndate: \"2026-02-19\"\nupdated: \"2026-08-01\"\ncategory: \"Editing\"\ncategoryOrder: 1\norder: 1\nsection: \"Platform\"\n---\n# Publishing Changes\n\nWhen you edit files in Doccupine, your changes are staged as pending. Nothing goes live until you explicitly publish.\n\n## The publish workflow\n\n1. Make edits to your files using the file editor.\n2. Click the **Publish** button in the project header. It appears as soon as anything is staged, with a badge showing the number of pending changes.\n3. Review the change set in the publish modal. Each file expands into a diff of what you actually changed, line by line, against what is currently in your repository.\n4. Optionally tick **Custom commit message** and write your own. Without one, the message is built from the files you are committing, like `Update docs/guide.mdx`.\n5. Click **Deploy**.\n\nDoccupine then:\n\n- Commits all pending changes to your GitHub repository\n- Triggers a new deployment\n- Clears all pending changes from the staging area\n\n<Callout type=\"note\">\n The deployment status badge next to the project name updates as your site builds. It cycles through **Queued**, **Building**, and **Ready** (or **Error** if something went wrong).\n</Callout>\n\n## Checks before a publish\n\nA few kinds of mistake do not break one page, they stop the whole site from building. Doccupine checks for those before committing anything and refuses the publish with a message naming the file to fix, so you find out in the publish modal instead of in a failed deploy.\n\n### An OpenAPI source that will not be there\n\nIf `doccupine.json` names an OpenAPI spec, the root document and every recursively referenced local file must exist after the publish. Publish all of those files with the configuration change. Moving or deleting any document in the reference graph requires updating the relevant `$ref` or `openapi` path in the same change set.\n\n### Two pages on the same URL\n\nTwo files that resolve to the same route - `guide.mdx` and `guide/index.mdx`, for instance - are a duplicate page, and the build stops rather than guessing which one you meant. Rename or delete one of them.\n\n### Section names that become the same URL\n\nSection URLs come from section names, so \"API Reference\" and \"api-reference\" both become `/api-reference`. Pick one spelling and use it in the `section` field of both pages.\n\n<Callout type=\"note\">\n These checks look at the repository as it will be **after** your publish, so a file you are deleting in the same change set counts as gone. If a check cannot run - GitHub is unreachable, say - the publish goes ahead and the build remains the backstop.\n</Callout>\n\n## Discarding changes\n\nYou can throw away as much or as little as you like:\n\n- **A single line** - **Discard this line** on that line of the diff. The rest of the file stays staged. Line numbers do not drift as you go, so you can pick off several in a row. A deleted file has no lines to pick from, and a diff too large to show in full does not offer the control.\n- **A whole file** - **Discard this file's change** on its row in the change set returns the file to whatever is in your repository.\n- **Everything** - **Discard all**, above the change set, clears the staging area without committing anything.\n\nIf discarding leaves a file identical to what is already committed, it drops out of the change set on its own.\n\n<Callout type=\"note\">\n Discarding a line here counts as a hand edit, exactly like editing the page in the editor would. That matters if the page is tracked by [Agent Sync](/platform/self-updating-docs): a page you have touched by hand is always routed to review rather than being rewritten automatically.\n</Callout>\n\n## File status badges\n\nIn the publish modal, every row in the change set carries a badge for what happened to the file, alongside a count of the lines added and removed:\n\n- **created** - the file is new\n- **updated** - the file already exists and was edited\n- **deleted** - the file is being removed\n\nA file that [Agent Sync](/platform/self-updating-docs) staged carries an **agent** badge as well, so the agent's proposals are distinguishable from your own edits at a glance.\n\nIf the diffs cannot be loaded, the modal falls back to a plain file list whose badges read **mod**, **del**, or **bin** - the last for a binary asset such as an image or a font, which has no text diff to show.\n\n## Changes staged by Agent Sync\n\nAgent Sync stages the pages it writes into the same staging area your own edits go to, so a single publish commits both. The modal tells you when that is happening:\n\n- **A conversation is waiting for review** - a notice names how many. Publishing or discarding those files here also settles the agent conversation, exactly as reviewing it from Agent Sync would.\n- **A run is still writing** - the notice says so, and **Deploy**, **Discard all**, and the per-file and per-line discard controls stay disabled until the run finishes. Committing half-written pages, or pulling files out from under a run, would leave the conversation recording one decision and your repository holding another.\n\nDiscarding an agent's file reconciles its conversation: the proposal is dropped from the run and its file count shrinks. Discard everything a run wrote and the conversation records the change set as **discarded**, so the thread reads as a review decision rather than an abandoned run.\n\n<Callout type=\"note\">\n Cherry-picking is easier from Agent Sync itself. Its run view keeps the agent's original change set and offers **Restore discarded changes** to put back whatever you removed - here in the publish modal, a discard is final.\n</Callout>\n\n## Auto-deploy from GitHub\n\nIf you're using a user-connected GitHub repository and push changes directly (outside of Doccupine), the webhook triggers an automatic redeploy. This means you can use Doccupine's editor and Git-based workflows interchangeably.";
1
+ export declare const platformPublishingMdxTemplate = "---\ntitle: \"Publishing Changes\"\ndescription: \"Commit your edits to GitHub and deploy your documentation site with one click.\"\ndate: \"2026-02-19\"\nupdated: \"2026-08-01\"\ncategory: \"Editing\"\ncategoryOrder: 1\norder: 1\nsection: \"Platform\"\n---\n# Publishing Changes\n\nWhen you edit files in Doccupine, your changes are staged as pending. Nothing goes live until you explicitly publish.\n\n## The publish workflow\n\n1. Make edits to your files using the file editor.\n2. Click the **Publish** button in the project header. It appears as soon as anything is staged, with a badge showing the number of pending changes.\n3. Review the change set in the publish modal. Each file expands into a diff of what you actually changed, line by line, against what is currently in your repository.\n4. Optionally tick **Custom commit message** and write your own. Without one, the message is built from the files you are committing, like `Update docs/guide.mdx`.\n5. Click **Deploy**.\n\nDoccupine then:\n\n- Commits all pending changes to your GitHub repository\n- Triggers a new deployment\n- Clears all pending changes from the staging area\n\n<Callout type=\"note\">\n The deployment status badge next to the project name updates as your site builds. It cycles through **Queued**, **Building**, and **Ready** (or **Error** if something went wrong).\n</Callout>\n\n## Checks before a publish\n\nA few kinds of mistake do not break one page, they stop the whole site from building. Doccupine checks for those before committing anything and refuses the publish with a message naming the file to fix, so you find out in the publish modal instead of in a failed deploy.\n\n### An OpenAPI source that will not be there\n\nIf `doccupine.json` names an OpenAPI spec, the root document and every recursively referenced local file must exist after the publish. Publish all of those files with the configuration change. Moving or deleting any document in the reference graph requires updating the relevant `$ref` or `openapi` path in the same change set.\n\n### Two pages on the same URL\n\nTwo files that resolve to the same route - `guide.mdx` and `guide/index.mdx`, for instance - are a duplicate page, and the build stops rather than guessing which one you meant. Rename or delete one of them.\n\n### Section names that become the same URL\n\nSection URLs come from section names, so \"API Reference\" and \"api-reference\" both become `/api-reference`. Pick one spelling and use it in the `section` field of both pages.\n\n### Languages and versions that collide with other URLs\n\nOn a site with [languages](/platform/languages) or [versions](/platform/versions), a language code or version slug becomes a URL prefix, so it must not equal a section name, the first folder of a section's `directory`, or a reserved route segment (`api`, `gate`, `mcp`, `ingest`). An invalid `languages.json` or `versions.json`, a folder named after the default language, or a version folder placed before a language folder is refused too. The message names the entry to fix.\n\n<Callout type=\"note\">\n These checks look at the repository as it will be **after** your publish, so a file you are deleting in the same change set counts as gone. If a check cannot run - GitHub is unreachable, say - the publish goes ahead and the build remains the backstop.\n</Callout>\n\n## Discarding changes\n\nYou can throw away as much or as little as you like:\n\n- **A single line** - **Discard this line** on that line of the diff. The rest of the file stays staged. Line numbers do not drift as you go, so you can pick off several in a row. A deleted file has no lines to pick from, and a diff too large to show in full does not offer the control.\n- **A whole file** - **Discard this file's change** on its row in the change set returns the file to whatever is in your repository.\n- **Everything** - **Discard all**, above the change set, clears the staging area without committing anything.\n\nIf discarding leaves a file identical to what is already committed, it drops out of the change set on its own.\n\n<Callout type=\"note\">\n Discarding a line here counts as a hand edit, exactly like editing the page in the editor would. That matters if the page is tracked by [Agent Sync](/platform/self-updating-docs): a page you have touched by hand is always routed to review rather than being rewritten automatically.\n</Callout>\n\n## File status badges\n\nIn the publish modal, every row in the change set carries a badge for what happened to the file, alongside a count of the lines added and removed:\n\n- **created** - the file is new\n- **updated** - the file already exists and was edited\n- **deleted** - the file is being removed\n\nA file that [Agent Sync](/platform/self-updating-docs) staged carries an **agent** badge as well, so the agent's proposals are distinguishable from your own edits at a glance.\n\nIf the diffs cannot be loaded, the modal falls back to a plain file list whose badges read **mod**, **del**, or **bin** - the last for a binary asset such as an image or a font, which has no text diff to show.\n\n## Changes staged by Agent Sync\n\nAgent Sync stages the pages it writes into the same staging area your own edits go to, so a single publish commits both. The modal tells you when that is happening:\n\n- **A conversation is waiting for review** - a notice names how many. Publishing or discarding those files here also settles the agent conversation, exactly as reviewing it from Agent Sync would.\n- **A run is still writing** - the notice says so, and **Deploy**, **Discard all**, and the per-file and per-line discard controls stay disabled until the run finishes. Committing half-written pages, or pulling files out from under a run, would leave the conversation recording one decision and your repository holding another.\n\nDiscarding an agent's file reconciles its conversation: the proposal is dropped from the run and its file count shrinks. Discard everything a run wrote and the conversation records the change set as **discarded**, so the thread reads as a review decision rather than an abandoned run.\n\n<Callout type=\"note\">\n Cherry-picking is easier from Agent Sync itself. Its run view keeps the agent's original change set and offers **Restore discarded changes** to put back whatever you removed - here in the publish modal, a discard is final.\n</Callout>\n\n## Auto-deploy from GitHub\n\nIf you're using a user-connected GitHub repository and push changes directly (outside of Doccupine), the webhook triggers an automatic redeploy. This means you can use Doccupine's editor and Git-based workflows interchangeably.";
@@ -46,6 +46,10 @@ Two files that resolve to the same route - \`guide.mdx\` and \`guide/index.mdx\`
46
46
 
47
47
  Section URLs come from section names, so "API Reference" and "api-reference" both become \`/api-reference\`. Pick one spelling and use it in the \`section\` field of both pages.
48
48
 
49
+ ### Languages and versions that collide with other URLs
50
+
51
+ On a site with [languages](/platform/languages) or [versions](/platform/versions), a language code or version slug becomes a URL prefix, so it must not equal a section name, the first folder of a section's \`directory\`, or a reserved route segment (\`api\`, \`gate\`, \`mcp\`, \`ingest\`). An invalid \`languages.json\` or \`versions.json\`, a folder named after the default language, or a version folder placed before a language folder is refused too. The message names the entry to fix.
52
+
49
53
  <Callout type="note">
50
54
  These checks look at the repository as it will be **after** your publish, so a file you are deleting in the same change set counts as gone. If a check cannot run - GitHub is unreachable, say - the publish goes ahead and the build remains the backstop.
51
55
  </Callout>
@@ -1 +1 @@
1
- export declare const platformSelfUpdatingDocsMdxTemplate = "---\ntitle: \"Agent Sync\"\ndescription: \"Agent Sync links documentation pages to the code they describe and rewrites them when that code changes, keeping your docs self-updating.\"\ndate: \"2026-07-24\"\nupdated: \"2026-08-01\"\ncategory: \"Editing\"\ncategoryOrder: 1\norder: 2\nsection: \"Platform\"\n---\n# Agent Sync\n\nDocumentation goes stale because code moves and nobody notices. **Agent Sync** closes that gap: every page can be linked to the source files it documents, pinned to the exact commit it was written from. When those files change, the page is flagged as **drifted** - and the agent can rewrite it for you.\n\nYou'll find it under **Agent Sync** in the project sidebar.\n\n## The four views\n\n| View | What it's for |\n| --------- | ----------------------------------------------------------------------------- |\n| **Agent** | Ask questions about your code, or ask the agent to write and update pages |\n| **Map** | Each page beside the sources it came from, with its sync state |\n| **Table** | The same information as a dense, sortable list |\n| **Drift** | The queue of pages whose sources have changed |\n\nA badge on the sidebar link counts the pages currently waiting for attention.\n\n## Asking the agent for docs\n\nThe **Agent** view is a chat. Choose a **source repository** and a **scope** - the whole repo, a folder, or a single file - then either ask a question or ask for a change.\n\n**Questions are answered in the chat.** Ask what a module does, which pages cover a feature, or whether a guide still matches the code, and the agent reads the source and replies without touching your documentation:\n\n> Which pages would break if we renamed the refresh-token endpoint?\n\n**Asking for a change starts a run.** The agent researches the code, plans the pages, and writes them:\n\n> Document the auth module - cover sessions, refresh tokens and the error codes.\n\n> Update the buttons page so it matches the current component.\n\nReplies are threaded, so a follow-up builds on what came before - and agreeing to something the agent suggested is enough to start the work, without repeating yourself:\n\n> Now do the same for the CLI.\n\nA turn that changes documentation shows the steps the agent took, the pages it changed, the sources it read, and what the run cost. You can switch between conversations, rename them, or start a fresh one.\n\nA run commits itself only when every page it wrote is set to auto-update and untouched by hand. Anything else is staged alongside your own edits and waits, and you can settle it from the conversation or from the project's [Publish](/platform/publishing) modal - either way, the other side is kept in step.\n\n<Callout type=\"note\">\n An empty result is a valid answer. If the docs already describe the code accurately, the agent will say so rather than rewriting pages for the sake of it.\n</Callout>\n\n## Linking pages to sources\n\nA page needs at least one source link before drift can be detected. There are three ways to create them:\n\n<Steps>\n <Step title=\"Automatically, as the agent writes\">\n Every page the agent produces records the files it was derived from. Sites created by [Import from GitHub](/platform/import-from-github) arrive fully linked.\n </Step>\n <Step title=\"Auto-link existing pages\">\n **Auto-link code** scans your existing pages, proposes matching files from every source repository, and lets you approve the links in one batch. It's a good way to bootstrap a hand-written site.\n </Step>\n <Step title=\"By hand\">\n Open an MDX page in the editor, select **Source links** in the toolbar, then choose a repository and match one file, a folder, or a path pattern. Hand-written pages can be tracked this way without ever having been generated.\n </Step>\n</Steps>\n\n## Auto-link existing pages\n\nUse **Auto-link code** in the Agent Sync header when you already have documentation but it is not connected to its source code yet.\n\n<Steps>\n <Step title=\"Start the scan\">\n Select **Auto-link code**. Doccupine reads the committed Markdown and MDX pages in your docs repository that do not have source links yet, then compares them with file paths from all your source repositories. Pending editor changes are not included until they are published.\n </Step>\n <Step title=\"Review the suggestions\">\n Suggestions are grouped by page. A strong match means the page names or references the file, so it starts selected. A weaker name match is left unselected for you to confirm. You can change any checkbox, and existing source links are never replaced.\n </Step>\n <Step title=\"Link the selected files\">\n Select **Link selected (N)**. Each approved file is recorded against the page and pinned to the repository's current commit. The page appears as **In sync** in the Map and Table views; Auto-link does not rewrite, commit, or publish the documentation.\n </Step>\n</Steps>\n\nThe normal scan is deterministic and uses no AI credit. **AI auto-select** is optional: it asks the configured AI model to refine the offered matches, uses AI credit, and only changes which checkboxes are selected. You still review the result and select **Link selected (N)** to save it.\n\n<Callout type=\"note\">\n Auto-link skips pages that already have at least one source link. To add another file, folder, or pattern to one of those pages, open the page's **Source links** panel in the editor and link it manually.\n</Callout>\n\nIf the scan finds an OpenAPI specification and your `doccupine.json` does not configure one yet, it also offers **Add to doccupine.json (N)**. This stages the configuration and, when needed, a copy of the specification as pending changes. Review and publish those changes through the normal publishing flow.\n\n## How drift is detected\n\nDoccupine watches your source repositories two ways:\n\n- **Push webhook** - instant, and used whenever Doccupine can install a hook on the repository. Your project's own repository always has one.\n- **Background check** - every 30 minutes, for repositories you don't administer.\n\nThe Source repositories manager shows which one each repo is using, as an **Instant** or **~30 min** badge.\n\n## Review or publish automatically\n\nWhen a linked source changes, what happens next depends on the page:\n\n| Page setting | On drift |\n| -------------------------------- | ---------------------------------------------------------------- |\n| Default | Flagged for review - you trigger the update |\n| **Auto-update** on | The agent rewrites the page and publishes it |\n| Edited by a human | **Always** flagged for review, whatever else is set |\n\nEach row on the Map and Table views has an **Auto-update this page when its source changes** toggle, so you can let routine reference pages look after themselves while a carefully worded overview page always waits for you.\n\nThe same settings decide what happens to a run you started yourself from the Agent view - auto-update is not only about drift. What differs is that a run writes one change set and commits or stages it as a unit: if any page in it resolves to review, the whole set waits. Publishing half a coherent change and leaving the rest behind would be worse than waiting for you.\n\nFor anything in review, **Review update** opens the change set - the same diff view as [publishing](/platform/publishing) - and **Update from source** asks the agent to regenerate that one page on demand.\n\n<Callout type=\"warning\">\n Your edits are never overwritten. Doccupine compares the page's content against what the agent last wrote, so a page you've touched by hand is detected and routed to review - even if auto-update is on. Reformatting, line-ending changes, and blank-line churn don't count as edits.\n</Callout>\n\n## Source repositories\n\nYour project's own repository is always a source, so a repo that holds both code and docs needs no setup at all.\n\nFor a multi-repo setup, add the other repositories from Agent Sync:\n\n<Steps>\n <Step title=\"Open Source repositories\">\n Select **Source repositories** in the Agent Sync header. Your project's repository appears first with a **Default** badge and cannot be removed.\n </Step>\n <Step title=\"Choose another repository\">\n Project owners and editors can select **Add repository**, then search the GitHub repositories they own, collaborate on, or can access through an organization. If GitHub is not connected yet, select **Connect GitHub**, finish authorization, then reopen the manager.\n </Step>\n <Step title=\"Check its connection\">\n Selecting a repository adds it immediately. **Instant** means Doccupine installed a push webhook; **~30 min** means it will check for source changes on a schedule instead. Both modes support the agent, manual source links, Auto-link code, and drift tracking.\n </Step>\n</Steps>\n\nOnce connected, the repository appears in the Agent view's **Source repository** selector and anywhere you create a source link.\n\n<Callout type=\"note\">\n Removing a repository never deletes your documentation pages. If pages still link to it, Doccupine tells you how many are affected and asks again before removing those source links. The pages remain, but they stop tracking changes from that repository.\n</Callout>\n\n## Notifications\n\nDoccupine emails the project owner when pages are ready to review, and when pages have been updated and published. You're notified once per project when pages first drift - a later change to the same page won't email you again until you've dealt with it.\n\n## What it costs\n\nAgent runs spend whatever the project's [AI setting](/platform/ai-assistant) points at - the AI credit included with your plan, or your own provider key. Doccupine keeps that spend predictable either way:\n\n- Automatic regeneration only ever happens for pages you've explicitly set to auto-update. A page waiting for review costs nothing when its source changes.\n- Drift that changes no lines - a merge or a rename that leaves the tracked file's content alone - never triggers a run.\n- Every run has a ceiling on pages, and a ceiling on spend: a built-in one on included credit, or the limit you set on your own key.\n- Only one run happens at a time per project.\n\nIf AI is switched off for the project, Agent Sync keeps tracking drift but the agent cannot run, and the page says so.\n\n## In the editor\n\nYou don't have to leave the editor to use any of this. The toolbar has a source status button showing whether the open page is in sync, drifted, or unlinked - and why it would need review - and the side panel lets you ask the agent for a block of MDX to drop straight in at your cursor.";
1
+ export declare const platformSelfUpdatingDocsMdxTemplate = "---\ntitle: \"Agent Sync\"\ndescription: \"Agent Sync links documentation pages to the code they describe and rewrites them when that code changes, keeping your docs self-updating.\"\ndate: \"2026-07-24\"\nupdated: \"2026-08-01\"\ncategory: \"Editing\"\ncategoryOrder: 1\norder: 2\nsection: \"Platform\"\n---\n# Agent Sync\n\nDocumentation goes stale because code moves and nobody notices. **Agent Sync** closes that gap: every page can be linked to the source files it documents, pinned to the exact commit it was written from. When those files change, the page is flagged as **drifted** - and the agent can rewrite it for you.\n\nYou'll find it under **Agent Sync** in the project sidebar.\n\n## The four views\n\n| View | What it's for |\n| --------- | ----------------------------------------------------------------------------- |\n| **Agent** | Ask questions about your code, or ask the agent to write and update pages |\n| **Map** | Each page beside the sources it came from, with its sync state |\n| **Table** | The same information as a dense, sortable list |\n| **Drift** | The queue of pages whose sources have changed |\n\nA badge on the sidebar link counts the pages currently waiting for attention.\n\n## Asking the agent for docs\n\nThe **Agent** view is a chat. Choose a **source repository** and a **scope** - the whole repo, a folder, or a single file - then either ask a question or ask for a change.\n\n**Questions are answered in the chat.** Ask what a module does, which pages cover a feature, or whether a guide still matches the code, and the agent reads the source and replies without touching your documentation:\n\n> Which pages would break if we renamed the refresh-token endpoint?\n\n**Asking for a change starts a run.** The agent researches the code, plans the pages, and writes them:\n\n> Document the auth module - cover sessions, refresh tokens and the error codes.\n\n> Update the buttons page so it matches the current component.\n\nReplies are threaded, so a follow-up builds on what came before - and agreeing to something the agent suggested is enough to start the work, without repeating yourself:\n\n> Now do the same for the CLI.\n\nA turn that changes documentation shows the steps the agent took, the pages it changed, the sources it read, and what the run cost. You can switch between conversations, rename them, or start a fresh one.\n\nA run commits itself only when every page it wrote is set to auto-update and untouched by hand. Anything else is staged alongside your own edits and waits, and you can settle it from the conversation or from the project's [Publish](/platform/publishing) modal - either way, the other side is kept in step.\n\n<Callout type=\"note\">\n An empty result is a valid answer. If the docs already describe the code accurately, the agent will say so rather than rewriting pages for the sake of it.\n</Callout>\n\nOn a site with [languages](/platform/languages), the agent writes and rewrites pages in the default language. Translate them afterwards from the Languages page or with **Translate to** in the editor.\n\n## Linking pages to sources\n\nA page needs at least one source link before drift can be detected. There are three ways to create them:\n\n<Steps>\n <Step title=\"Automatically, as the agent writes\">\n Every page the agent produces records the files it was derived from. Sites created by [Import from GitHub](/platform/import-from-github) arrive fully linked.\n </Step>\n <Step title=\"Auto-link existing pages\">\n **Auto-link code** scans your existing pages, proposes matching files from every source repository, and lets you approve the links in one batch. It's a good way to bootstrap a hand-written site.\n </Step>\n <Step title=\"By hand\">\n Open an MDX page in the editor, select **Source links** in the toolbar, then choose a repository and match one file, a folder, or a path pattern. Hand-written pages can be tracked this way without ever having been generated.\n </Step>\n</Steps>\n\n## Auto-link existing pages\n\nUse **Auto-link code** in the Agent Sync header when you already have documentation but it is not connected to its source code yet.\n\n<Steps>\n <Step title=\"Start the scan\">\n Select **Auto-link code**. Doccupine reads the committed Markdown and MDX pages in your docs repository that do not have source links yet, then compares them with file paths from all your source repositories. Pending editor changes are not included until they are published.\n </Step>\n <Step title=\"Review the suggestions\">\n Suggestions are grouped by page. A strong match means the page names or references the file, so it starts selected. A weaker name match is left unselected for you to confirm. You can change any checkbox, and existing source links are never replaced.\n </Step>\n <Step title=\"Link the selected files\">\n Select **Link selected (N)**. Each approved file is recorded against the page and pinned to the repository's current commit. The page appears as **In sync** in the Map and Table views; Auto-link does not rewrite, commit, or publish the documentation.\n </Step>\n</Steps>\n\nThe normal scan is deterministic and uses no AI credit. **AI auto-select** is optional: it asks the configured AI model to refine the offered matches, uses AI credit, and only changes which checkboxes are selected. You still review the result and select **Link selected (N)** to save it.\n\n<Callout type=\"note\">\n Auto-link skips pages that already have at least one source link. To add another file, folder, or pattern to one of those pages, open the page's **Source links** panel in the editor and link it manually.\n</Callout>\n\nIf the scan finds an OpenAPI specification and your `doccupine.json` does not configure one yet, it also offers **Add to doccupine.json (N)**. This stages the configuration and, when needed, a copy of the specification as pending changes. Review and publish those changes through the normal publishing flow.\n\n## How drift is detected\n\nDoccupine watches your source repositories two ways:\n\n- **Push webhook** - instant, and used whenever Doccupine can install a hook on the repository. Your project's own repository always has one.\n- **Background check** - every 30 minutes, for repositories you don't administer.\n\nThe Source repositories manager shows which one each repo is using, as an **Instant** or **~30 min** badge.\n\n## Review or publish automatically\n\nWhen a linked source changes, what happens next depends on the page:\n\n| Page setting | On drift |\n| -------------------------------- | ---------------------------------------------------------------- |\n| Default | Flagged for review - you trigger the update |\n| **Auto-update** on | The agent rewrites the page and publishes it |\n| Edited by a human | **Always** flagged for review, whatever else is set |\n\nEach row on the Map and Table views has an **Auto-update this page when its source changes** toggle, so you can let routine reference pages look after themselves while a carefully worded overview page always waits for you.\n\nThe same settings decide what happens to a run you started yourself from the Agent view - auto-update is not only about drift. What differs is that a run writes one change set and commits or stages it as a unit: if any page in it resolves to review, the whole set waits. Publishing half a coherent change and leaving the rest behind would be worse than waiting for you.\n\nFor anything in review, **Review update** opens the change set - the same diff view as [publishing](/platform/publishing) - and **Update from source** asks the agent to regenerate that one page on demand.\n\n<Callout type=\"warning\">\n Your edits are never overwritten. Doccupine compares the page's content against what the agent last wrote, so a page you've touched by hand is detected and routed to review - even if auto-update is on. Reformatting, line-ending changes, and blank-line churn don't count as edits.\n</Callout>\n\n## Source repositories\n\nYour project's own repository is always a source, so a repo that holds both code and docs needs no setup at all.\n\nFor a multi-repo setup, add the other repositories from Agent Sync:\n\n<Steps>\n <Step title=\"Open Source repositories\">\n Select **Source repositories** in the Agent Sync header. Your project's repository appears first with a **Default** badge and cannot be removed.\n </Step>\n <Step title=\"Choose another repository\">\n Project owners and editors can select **Add repository**, then search the GitHub repositories they own, collaborate on, or can access through an organization. If GitHub is not connected yet, select **Connect GitHub**, finish authorization, then reopen the manager.\n </Step>\n <Step title=\"Check its connection\">\n Selecting a repository adds it immediately. **Instant** means Doccupine installed a push webhook; **~30 min** means it will check for source changes on a schedule instead. Both modes support the agent, manual source links, Auto-link code, and drift tracking.\n </Step>\n</Steps>\n\nOnce connected, the repository appears in the Agent view's **Source repository** selector and anywhere you create a source link.\n\n<Callout type=\"note\">\n Removing a repository never deletes your documentation pages. If pages still link to it, Doccupine tells you how many are affected and asks again before removing those source links. The pages remain, but they stop tracking changes from that repository.\n</Callout>\n\n## Notifications\n\nDoccupine emails the project owner when pages are ready to review, and when pages have been updated and published. You're notified once per project when pages first drift - a later change to the same page won't email you again until you've dealt with it.\n\n## What it costs\n\nAgent runs spend whatever the project's [AI setting](/platform/ai-assistant) points at - the AI credit included with your plan, or your own provider key. Doccupine keeps that spend predictable either way:\n\n- Automatic regeneration only ever happens for pages you've explicitly set to auto-update. A page waiting for review costs nothing when its source changes.\n- Drift that changes no lines - a merge or a rename that leaves the tracked file's content alone - never triggers a run.\n- Every run has a ceiling on pages, and a ceiling on spend: a built-in one on included credit, or the limit you set on your own key.\n- Only one run happens at a time per project.\n\nIf AI is switched off for the project, Agent Sync keeps tracking drift but the agent cannot run, and the page says so.\n\n## In the editor\n\nYou don't have to leave the editor to use any of this. The toolbar has a source status button showing whether the open page is in sync, drifted, or unlinked - and why it would need review - and the side panel lets you ask the agent for a block of MDX to drop straight in at your cursor.";
@@ -51,6 +51,8 @@ A run commits itself only when every page it wrote is set to auto-update and unt
51
51
  An empty result is a valid answer. If the docs already describe the code accurately, the agent will say so rather than rewriting pages for the sake of it.
52
52
  </Callout>
53
53
 
54
+ On a site with [languages](/platform/languages), the agent writes and rewrites pages in the default language. Translate them afterwards from the Languages page or with **Translate to** in the editor.
55
+
54
56
  ## Linking pages to sources
55
57
 
56
58
  A page needs at least one source link before drift can be detected. There are three ways to create them:
@@ -0,0 +1 @@
1
+ export declare const platformVersionsMdxTemplate = "---\ntitle: \"Versions\"\ndescription: \"Freeze the current documentation as a version from the dashboard and keep older versions online.\"\ndate: \"2026-09-08\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 7\nsection: \"Platform\"\n---\n# Versions\n\nThe **Versions** page under a project's settings manages the project's `versions.json` and the version folders in its repository. It is the dashboard counterpart of the CLI's [Versions](/versions) feature, and it stages everything as pending changes for you to review and [publish](/platform/publishing).\n\n## Enabling versions\n\nTurn on **Enable versions** and give the current documentation a label, such as `v2.0`. Saving writes a `versions.json` with that single default entry. Nothing moves: the default version's pages stay at the root of the docs folder.\n\n## Creating a version snapshot\n\nClick **Create version snapshot**, enter the slug (`v1`) and label (`v1.0`) of the version you want to freeze, and confirm. The current pages of the default version are copied into the version folder, in every configured language, and the new entry is added to `versions.json`. Keep editing the root as the next release and change the default entry's label when it ships.\n\n## Editing a version\n\nThe file explorer shows a version selector when versions are configured, so you work inside one version at a time. Pages inside a version folder are ordinary MDX files.\n\n## Removing a version\n\nRemoving a version from the list asks whether its pages should be deleted too. The removal, the deleted pages, and the updated `versions.json` are staged together and appear in the Publish dialog.\n\n## Rules\n\nA version slug must be a lowercase URL segment and must not collide with a section slug, a language code, or a reserved route segment. The page refuses a collision when you save, and the Publish dialog refuses a change set that would stop the site build. The default entry cannot be removed or given a slug.\n";
@@ -0,0 +1,33 @@
1
+ export const platformVersionsMdxTemplate = `---
2
+ title: "Versions"
3
+ description: "Freeze the current documentation as a version from the dashboard and keep older versions online."
4
+ date: "2026-09-08"
5
+ category: "Configuration"
6
+ categoryOrder: 2
7
+ order: 7
8
+ section: "Platform"
9
+ ---
10
+ # Versions
11
+
12
+ The **Versions** page under a project's settings manages the project's \`versions.json\` and the version folders in its repository. It is the dashboard counterpart of the CLI's [Versions](/versions) feature, and it stages everything as pending changes for you to review and [publish](/platform/publishing).
13
+
14
+ ## Enabling versions
15
+
16
+ Turn on **Enable versions** and give the current documentation a label, such as \`v2.0\`. Saving writes a \`versions.json\` with that single default entry. Nothing moves: the default version's pages stay at the root of the docs folder.
17
+
18
+ ## Creating a version snapshot
19
+
20
+ Click **Create version snapshot**, enter the slug (\`v1\`) and label (\`v1.0\`) of the version you want to freeze, and confirm. The current pages of the default version are copied into the version folder, in every configured language, and the new entry is added to \`versions.json\`. Keep editing the root as the next release and change the default entry's label when it ships.
21
+
22
+ ## Editing a version
23
+
24
+ The file explorer shows a version selector when versions are configured, so you work inside one version at a time. Pages inside a version folder are ordinary MDX files.
25
+
26
+ ## Removing a version
27
+
28
+ Removing a version from the list asks whether its pages should be deleted too. The removal, the deleted pages, and the updated \`versions.json\` are staged together and appear in the Publish dialog.
29
+
30
+ ## Rules
31
+
32
+ A version slug must be a lowercase URL segment and must not collide with a section slug, a language code, or a reserved route segment. The page refuses a collision when you save, and the Publish dialog refuses a change set that would stop the site build. The default entry cannot be removed or given a slug.
33
+ `;
@@ -1 +1 @@
1
- export declare const sectionsMdxTemplate = "---\ntitle: \"Sections\"\ndescription: \"Split your documentation into top-level sections with independent sidebars.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 3\n---\n# Sections\n\nSections let you divide your documentation into separate top-level areas - for example \"Guides\", \"API Reference\", and \"SDKs\". Each section gets its own sidebar and appears as a horizontal tab bar below the site header.\n\n<Callout type=\"note\">\n Sections are entirely opt-in. If you don't configure them, nothing changes - your site works exactly as before with a single flat navigation.\n</Callout>\n\n## Automatic sections (frontmatter)\n\nThe simplest way to add sections is through page frontmatter. Add a `section` field to group pages, and an optional `sectionOrder` to control the order of sections in the bar.\n\n### Frontmatter fields\n\n- **section**: The display name for the section this page belongs to (e.g. \"API Reference\").\n- **sectionOrder**: Controls the position of the section in the bar. Lower numbers appear first.\n\nThe section slug is derived automatically from the label - lowercased with spaces replaced by hyphens. So \"API Reference\" becomes `api-reference`.\n\nPages without a `section` field stay at the root URL and appear under a default tab labeled \"Docs\". You can rename this tab with the `sectionLabel` field on your `index.mdx`:\n\n```text\n---\ntitle: \"Welcome\"\nsectionLabel: \"Guides\"\n---\n```\n\n### Directory-based organization\n\nYou can organize each section's files in a subdirectory that matches the section slug. When the directory name matches, Doccupine automatically assigns the files to that section and strips the directory from the URL.\n\n```text\ndocs/\n index.mdx\n getting-started.mdx\n platform/\n index.mdx -> /platform\n auth.mdx -> /platform/auth\n```\n\nWhere `platform/index.mdx` has:\n\n```text\n---\ntitle: \"Platform Overview\"\nsection: \"Platform\"\nsectionOrder: 1\ncategory: \"Getting Started\"\n---\n```\n\nThe directory `platform/` matches the section slug `platform`, so it is stripped. `platform/index.mdx` serves at `/platform/` and `platform/auth.mdx` serves at `/platform/auth`.\n\n<Callout type=\"info\">\n Once a section exists, any file placed in a matching directory is automatically assigned to it - even without a `section` field in its own frontmatter. Only the first file needs `section` and `sectionOrder` to create the section. After that, the directory does the work.\n</Callout>\n\nFiles at the root level with a `section` field work too - they keep their full slug under the section prefix.\n\n### Section index pages\n\nIf a section has no index page (no file at its root URL), Doccupine generates a redirect to the first page in that section, sorted by `categoryOrder` then `order`.\n\n<Callout type=\"note\">\n You can override the auto-redirect by creating an `index.mdx` in the section's directory.\n</Callout>\n\n### Flat file example\n\nYou can also keep all files at the root and rely purely on frontmatter:\n\n```text\n---\ntitle: \"Authentication\"\nsection: \"API Reference\"\nsectionOrder: 2\ncategory: \"Auth\"\ncategoryOrder: 1\norder: 1\n---\n```\n\nThis page would be served at `/api-reference/authentication`.\n\n## Explicit sections with sections.json\n\nFor full control over slugs, create a `sections.json` file at your project root (the same directory where you run `npx doccupine`).\n\n### Minimal example\n\n```json\n[\n { \"label\": \"Docs\", \"slug\": \"\" },\n { \"label\": \"Platform\", \"slug\": \"platform\" }\n]\n```\n\nThis defines two sections. Pages are assigned automatically:\n\n- Files in a `platform/` directory belong to the \"Platform\" section (directory name matches slug).\n- Files with `section: \"Platform\"` in their frontmatter also belong to it.\n- Everything else stays in the root \"Docs\" section.\n\nNo `directory` field is needed when the directory name already matches the section slug.\n\n### Example with explicit directories\n\nWhen the directory name differs from the slug, use the `directory` field to map them:\n\n```json\n[\n { \"label\": \"Guides\", \"slug\": \"\", \"directory\": \"guides\" },\n { \"label\": \"API Reference\", \"slug\": \"api\", \"directory\": \"api-reference\" },\n { \"label\": \"SDKs\", \"slug\": \"sdks\", \"directory\": \"sdks\" }\n]\n```\n\n### Fields\n\n- **label**: The display name shown in the section bar.\n- **slug**: The URL prefix for this section. Use an empty string `\"\"` for the default section that serves at the root.\n- **directory** (optional): The subdirectory under your watch directory that contains this section's MDX files. Only needed when the directory name differs from the slug.\n\n<Callout type=\"warning\">\n Section slugs and directories must be safe relative paths, and no two entries may reuse the same slug or directory. Doccupine stops with an actionable validation error instead of generating overlapping routes.\n</Callout>\n\n### Directory structure example\n\nWith the explicit directory config above and a watch directory of `docs`, your files would look like:\n\n```text\ndocs/\n guides/\n index.mdx\n getting-started.mdx\n api-reference/\n authentication.mdx\n endpoints.mdx\n sdks/\n javascript.mdx\n python.mdx\n```\n\n## Section navigation\n\nEach section builds its own sidebar from the pages that belong to it. By default, pages are grouped by `category` and sorted by `categoryOrder` and `order` from frontmatter.\n\nFor explicit control, use `navigation.json` with the object format to define per-section navigation:\n\n```json\n{\n \"\": [\n {\n \"label\": \"General\",\n \"links\": [{ \"slug\": \"\", \"title\": \"Getting Started\" }]\n }\n ],\n \"platform\": [\n { \"label\": \"API\", \"links\": [{ \"slug\": \"platform/auth\", \"title\": \"Auth\" }] }\n ]\n}\n```\n\nKeys are section slugs. The root section uses `\"\"`. Sections without a key fall back to auto-generated navigation. See the Navigation page for the full format.\n\n## How pages are assigned to sections\n\nDoccupine checks these rules in order and uses the first match:\n\n1. **Explicit directory** - the file is inside a directory listed in a section's `directory` field.\n2. **Directory matches slug** - the file's parent directory matches a section slug (e.g. files in `platform/` match a section with `slug: \"platform\"`).\n3. **Frontmatter section field** - the file's `section` value matches a section label.\n4. **No match** - the page stays at the root.\n\n## Precedence for section discovery\n\n1. **sections.json exists** - Doccupine uses it to define available sections.\n2. **No sections.json but pages have `section` frontmatter** - Doccupine auto-discovers sections from the frontmatter. Sections update live as you add or remove the `section` field from files.\n3. **Neither** - No section bar appears. The site works exactly as before.\n\n## URL structure\n\nPages in the default section (with `slug: \"\"`) serve at the root:\n\n- Default section: `/getting-started`, `/installation`\n- Other sections: `/api/authentication`, `/sdks/javascript`\n\n<Callout type=\"info\">\n When a file is in a directory that matches its section slug, the directory is stripped so it doesn't appear twice. For example, `platform/auth.mdx` in the \"Platform\" section serves at `/platform/auth`, not `/platform/platform/auth`.\n</Callout>\n\n## sections.json vs navigation.json\n\nThese two config files serve different purposes and complement each other:\n\n- **sections.json** defines which sections exist - their labels, slugs, directory mappings, and order in the tab bar.\n- **navigation.json** controls the sidebar within each section - page ordering and grouping.\n\nYou can use either one independently. `sections.json` without `navigation.json` gives you sections with auto-generated sidebars. `navigation.json` without `sections.json` gives you custom sidebar ordering with frontmatter-discovered sections (or no sections at all).\n\n## Tips\n\n- **Start simple**: Add `section` and `sectionOrder` to a few pages to try it out. No config files needed.\n- **Use directories**: Organize each section's files in a directory that matches the section slug for clean URLs and a tidy file tree.\n- **Rename the default tab**: Add `sectionLabel: \"Your Label\"` to your `index.mdx` frontmatter. Defaults to \"Docs\" if omitted.\n- **Switch to sections.json**: When you need custom slugs or directory mappings that don't match section names, `sections.json` gives full control.\n- **Per-section navigation**: Use the object format in `navigation.json` to define custom sidebar ordering for specific sections.\n- **Independent sidebars**: Each section has its own sidebar. Previous/next navigation stays within the active section.";
1
+ export declare const sectionsMdxTemplate = "---\ntitle: \"Sections\"\ndescription: \"Split your documentation into top-level sections with independent sidebars.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 3\n---\n# Sections\n\nSections let you divide your documentation into separate top-level areas - for example \"Guides\", \"API Reference\", and \"SDKs\". Each section gets its own sidebar and appears as a horizontal tab bar below the site header.\n\n<Callout type=\"note\">\n Sections are entirely opt-in. If you don't configure them, nothing changes - your site works exactly as before with a single flat navigation.\n</Callout>\n\n## Automatic sections (frontmatter)\n\nThe simplest way to add sections is through page frontmatter. Add a `section` field to group pages, and an optional `sectionOrder` to control the order of sections in the bar.\n\n### Frontmatter fields\n\n- **section**: The display name for the section this page belongs to (e.g. \"API Reference\").\n- **sectionOrder**: Controls the position of the section in the bar. Lower numbers appear first.\n\nThe section slug is derived automatically from the label - lowercased with spaces replaced by hyphens. So \"API Reference\" becomes `api-reference`.\n\nPages without a `section` field stay at the root URL and appear under a default tab labeled \"Docs\". You can rename this tab with the `sectionLabel` field on your `index.mdx`:\n\n```text\n---\ntitle: \"Welcome\"\nsectionLabel: \"Guides\"\n---\n```\n\n### Directory-based organization\n\nYou can organize each section's files in a subdirectory that matches the section slug. When the directory name matches, Doccupine automatically assigns the files to that section and strips the directory from the URL.\n\n```text\ndocs/\n index.mdx\n getting-started.mdx\n platform/\n index.mdx -> /platform\n auth.mdx -> /platform/auth\n```\n\nWhere `platform/index.mdx` has:\n\n```text\n---\ntitle: \"Platform Overview\"\nsection: \"Platform\"\nsectionOrder: 1\ncategory: \"Getting Started\"\n---\n```\n\nThe directory `platform/` matches the section slug `platform`, so it is stripped. `platform/index.mdx` serves at `/platform/` and `platform/auth.mdx` serves at `/platform/auth`.\n\n<Callout type=\"info\">\n Once a section exists, any file placed in a matching directory is automatically assigned to it - even without a `section` field in its own frontmatter. Only the first file needs `section` and `sectionOrder` to create the section. After that, the directory does the work.\n</Callout>\n\nFiles at the root level with a `section` field work too - they keep their full slug under the section prefix.\n\n### Section index pages\n\nIf a section has no index page (no file at its root URL), Doccupine generates a redirect to the first page in that section, sorted by `categoryOrder` then `order`.\n\n<Callout type=\"note\">\n You can override the auto-redirect by creating an `index.mdx` in the section's directory.\n</Callout>\n\n### Flat file example\n\nYou can also keep all files at the root and rely purely on frontmatter:\n\n```text\n---\ntitle: \"Authentication\"\nsection: \"API Reference\"\nsectionOrder: 2\ncategory: \"Auth\"\ncategoryOrder: 1\norder: 1\n---\n```\n\nThis page would be served at `/api-reference/authentication`.\n\n## Explicit sections with sections.json\n\nFor full control over slugs, create a `sections.json` file at your project root (the same directory where you run `npx doccupine`).\n\n### Minimal example\n\n```json\n[\n { \"label\": \"Docs\", \"slug\": \"\" },\n { \"label\": \"Platform\", \"slug\": \"platform\" }\n]\n```\n\nThis defines two sections. Pages are assigned automatically:\n\n- Files in a `platform/` directory belong to the \"Platform\" section (directory name matches slug).\n- Files with `section: \"Platform\"` in their frontmatter also belong to it.\n- Everything else stays in the root \"Docs\" section.\n\nNo `directory` field is needed when the directory name already matches the section slug.\n\n### Example with explicit directories\n\nWhen the directory name differs from the slug, use the `directory` field to map them:\n\n```json\n[\n { \"label\": \"Guides\", \"slug\": \"\", \"directory\": \"guides\" },\n { \"label\": \"API Reference\", \"slug\": \"api\", \"directory\": \"api-reference\" },\n { \"label\": \"SDKs\", \"slug\": \"sdks\", \"directory\": \"sdks\" }\n]\n```\n\n### Fields\n\n- **label**: The display name shown in the section bar.\n- **slug**: The URL prefix for this section. Use an empty string `\"\"` for the default section that serves at the root.\n- **directory** (optional): The subdirectory under your watch directory that contains this section's MDX files. Only needed when the directory name differs from the slug.\n\n<Callout type=\"warning\">\n Section slugs and directories must be safe relative paths, and no two entries may reuse the same slug or directory. Doccupine stops with an actionable validation error instead of generating overlapping routes.\n</Callout>\n\n### Directory structure example\n\nWith the explicit directory config above and a watch directory of `docs`, your files would look like:\n\n```text\ndocs/\n guides/\n index.mdx\n getting-started.mdx\n api-reference/\n authentication.mdx\n endpoints.mdx\n sdks/\n javascript.mdx\n python.mdx\n```\n\n## Section navigation\n\nEach section builds its own sidebar from the pages that belong to it. By default, pages are grouped by `category` and sorted by `categoryOrder` and `order` from frontmatter.\n\nFor explicit control, use `navigation.json` with the object format to define per-section navigation:\n\n```json\n{\n \"\": [\n {\n \"label\": \"General\",\n \"links\": [{ \"slug\": \"\", \"title\": \"Getting Started\" }]\n }\n ],\n \"platform\": [\n { \"label\": \"API\", \"links\": [{ \"slug\": \"platform/auth\", \"title\": \"Auth\" }] }\n ]\n}\n```\n\nKeys are URL prefixes: a section slug, with `\"\"` for the root section. On a site with [languages](/languages) or [versions](/versions), a key can also carry the variant prefix (`\"de\"`, `\"de/platform\"`, `\"v1\"`). Scopes without a key fall back to auto-generated navigation. See the Navigation page for the full format.\n\n## How pages are assigned to sections\n\nDoccupine checks these rules in order and uses the first match:\n\n1. **Explicit directory** - the file is inside a directory listed in a section's `directory` field.\n2. **Directory matches slug** - the file's parent directory matches a section slug (e.g. files in `platform/` match a section with `slug: \"platform\"`).\n3. **Frontmatter section field** - the file's `section` value matches a section label.\n4. **No match** - the page stays at the root.\n\n## Precedence for section discovery\n\n1. **sections.json exists** - Doccupine uses it to define available sections.\n2. **No sections.json but pages have `section` frontmatter** - Doccupine auto-discovers sections from the frontmatter. Sections update live as you add or remove the `section` field from files.\n3. **Neither** - No section bar appears. The site works exactly as before.\n\n## URL structure\n\nPages in the default section (with `slug: \"\"`) serve at the root:\n\n- Default section: `/getting-started`, `/installation`\n- Other sections: `/api/authentication`, `/sdks/javascript`\n\n<Callout type=\"info\">\n When a file is in a directory that matches its section slug, the directory is stripped so it doesn't appear twice. For example, `platform/auth.mdx` in the \"Platform\" section serves at `/platform/auth`, not `/platform/platform/auth`.\n</Callout>\n\n## sections.json vs navigation.json\n\nThese two config files serve different purposes and complement each other:\n\n- **sections.json** defines which sections exist - their labels, slugs, directory mappings, and order in the tab bar.\n- **navigation.json** controls the sidebar within each section - page ordering and grouping.\n\nYou can use either one independently. `sections.json` without `navigation.json` gives you sections with auto-generated sidebars. `navigation.json` without `sections.json` gives you custom sidebar ordering with frontmatter-discovered sections (or no sections at all).\n\n## Tips\n\n- **Start simple**: Add `section` and `sectionOrder` to a few pages to try it out. No config files needed.\n- **Use directories**: Organize each section's files in a directory that matches the section slug for clean URLs and a tidy file tree.\n- **Rename the default tab**: Add `sectionLabel: \"Your Label\"` to your `index.mdx` frontmatter. Defaults to \"Docs\" if omitted.\n- **Switch to sections.json**: When you need custom slugs or directory mappings that don't match section names, `sections.json` gives full control.\n- **Per-section navigation**: Use the object format in `navigation.json` to define custom sidebar ordering for specific sections.\n- **Independent sidebars**: Each section has its own sidebar. Previous/next navigation stays within the active section.";
@@ -171,7 +171,7 @@ For explicit control, use \`navigation.json\` with the object format to define p
171
171
  }
172
172
  \`\`\`
173
173
 
174
- Keys are section slugs. The root section uses \`""\`. Sections without a key fall back to auto-generated navigation. See the Navigation page for the full format.
174
+ Keys are URL prefixes: a section slug, with \`""\` for the root section. On a site with [languages](/languages) or [versions](/versions), a key can also carry the variant prefix (\`"de"\`, \`"de/platform"\`, \`"v1"\`). Scopes without a key fall back to auto-generated navigation. See the Navigation page for the full format.
175
175
 
176
176
  ## How pages are assigned to sections
177
177
 
@@ -1 +1 @@
1
- export declare const themeMdxTemplate = "---\ntitle: \"Theme\"\ndescription: \"Customize the documentation UI colors with a theme.json file.\"\ndate: \"2026-02-19\"\nupdated: \"2026-08-04\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 5\n---\n# Theme\n\nDefine your site\u2019s color system with a `theme.json` file. This lets you tailor the look and feel of your documentation without changing content.\n\n## theme.json\n\nPlace a `theme.json` at your project root (the same directory where you execute `npx doccupine`). It supports multiple modes. Define a `default` mode and a `dark` mode.\n\n```json\n{\n \"default\": {\n \"primaryLight\": \"#93c5fd\",\n \"primary\": \"#2563eb\",\n \"primaryDark\": \"#1e40af\",\n \"secondaryLight\": \"#c4b5fd\",\n \"secondary\": \"#8b5cf6\",\n \"secondaryDark\": \"#5b21b6\",\n \"tertiaryLight\": \"#fbbf24\",\n \"tertiary\": \"#f59e0b\",\n \"tertiaryDark\": \"#d97706\",\n \"grayLight\": \"#f3f4f6\",\n \"gray\": \"#9ca3af\",\n \"grayDark\": \"#374151\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#000000\",\n \"light\": \"#ffffff\"\n },\n \"dark\": {\n \"primaryLight\": \"#9bcaff\",\n \"primary\": \"#1e7ae0\",\n \"primaryDark\": \"#033d7e\",\n \"secondaryLight\": \"#ddd6fe\",\n \"secondary\": \"#a78bfa\",\n \"secondaryDark\": \"#7c3aed\",\n \"tertiaryLight\": \"#fed7aa\",\n \"tertiary\": \"#fb923c\",\n \"tertiaryDark\": \"#ea580c\",\n \"grayLight\": \"#1f2937\",\n \"gray\": \"#6b7280\",\n \"grayDark\": \"#9ca3af\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#ffffff\",\n \"light\": \"#000000\"\n },\n \"logo\": {\n \"dark\": \"https://docs.doccupine.com/logo-dark.svg\",\n \"light\": \"https://docs.doccupine.com/logo-light.svg\"\n }\n}\n```\n\n## Modes\n\n- **default**: The base color palette for your site.\n- **dark**: Dark\u2011mode palette.\n\n## Fields\n\n- **primaryLight**: A lighter variant of your brand color, used for subtle accents and backgrounds.\n- **primary**: The main brand color.\n- **primaryDark**: A darker variant of your brand color for emphasis and hover states.\n- **secondaryLight**: A lighter variant of your secondary color, used for subtle accents and backgrounds.\n- **secondary**: The secondary brand color used for highlights and UI accents.\n- **secondaryDark**: A darker variant of your secondary color for emphasis and hover states.\n- **tertiaryLight**: A lighter variant of your tertiary color, used for subtle accents and backgrounds.\n- **tertiary**: The tertiary accent color.\n- **tertiaryDark**: A darker variant of your tertiary color for emphasis and hover states.\n- **grayLight**: Light gray for surfaces and borders.\n- **gray**: Neutral gray for text and UI elements.\n- **grayDark**: Dark gray for headings or high\u2011contrast text.\n- **success**: Positive/confirmation color.\n- **error**: Error/destructive color.\n- **warning**: Warning/attention color.\n- **info**: Informational/highlight color.\n- **dark**: The darkest/base color (often page background in dark mode).\n- **light**: The lightest/base color (often page background in light mode).\n- **logo.light**: Path or URL to the logo used on light backgrounds. Recommended size: 164\u00D730 px.\n- **logo.dark**: Path or URL to the logo used on dark backgrounds. Recommended size: 164\u00D730 px.\n\n## Behavior\n\n- **Placement**: Put `theme.json` in the project root alongside `config.json`.\n- **Partial palettes**: If a key is missing in a mode, consumers may fall back to the `default` value.\n- **Logo size**: Recommended dimensions are 164px width and 30px height.\n- **Browser chrome**: The `theme-color` shown in browser UI (such as the iOS Safari status bar) is derived from each mode's `primary` token, so it carries your brand color in both modes.\n\n<Callout type=\"warning\">\n Use valid hex colors (e.g., `#22c55e`). Invalid color values may cause unexpected rendering.\n</Callout>\n\n## Tips\n\n- **Contrast**: Ensure sufficient contrast between text and backgrounds for readability.\n- **Branding**: Start with your brand\u2019s `primary` color, then derive `primaryLight` and `primaryDark`.\n- **Iterate**: Adjust colors and refresh the site to preview changes quickly.\n\n# Demo\n\nIn the following demos, you can see how the theme can be changed. To override the theme, create a `theme.json` file in the project root and copy paste the code below.\n\n<DemoTheme variant=\"purple\" />\n<DemoTheme variant=\"green\" />\n<DemoTheme variant=\"yellow\" />\n<DemoTheme />\n\n## Purple\n\n```json\n{\n \"default\": {\n \"primaryLight\": \"#c4b5fd\",\n \"primary\": \"#8b5cf6\",\n \"primaryDark\": \"#5b21b6\",\n \"secondaryLight\": \"#86efac\",\n \"secondary\": \"#22c55e\",\n \"secondaryDark\": \"#15803d\",\n \"tertiaryLight\": \"#fbbf24\",\n \"tertiary\": \"#f59e0b\",\n \"tertiaryDark\": \"#d97706\",\n \"grayLight\": \"#f3f4f6\",\n \"gray\": \"#9ca3af\",\n \"grayDark\": \"#374151\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#000000\",\n \"light\": \"#ffffff\"\n },\n \"dark\": {\n \"primaryLight\": \"#ddd6fe\",\n \"primary\": \"#a78bfa\",\n \"primaryDark\": \"#7c3aed\",\n \"secondaryLight\": \"#6ee7b7\",\n \"secondary\": \"#10b981\",\n \"secondaryDark\": \"#065f46\",\n \"tertiaryLight\": \"#fed7aa\",\n \"tertiary\": \"#fb923c\",\n \"tertiaryDark\": \"#ea580c\",\n \"grayLight\": \"#1f2937\",\n \"gray\": \"#6b7280\",\n \"grayDark\": \"#9ca3af\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#ffffff\",\n \"light\": \"#000000\"\n }\n}\n```\n\n<DemoTheme variant=\"purple\" />\n\n## Green\n\n```json\n{\n \"default\": {\n \"primaryLight\": \"#86efac\",\n \"primary\": \"#22c55e\",\n \"primaryDark\": \"#15803d\",\n \"secondaryLight\": \"#c4b5fd\",\n \"secondary\": \"#8b5cf6\",\n \"secondaryDark\": \"#5b21b6\",\n \"tertiaryLight\": \"#fbbf24\",\n \"tertiary\": \"#f59e0b\",\n \"tertiaryDark\": \"#d97706\",\n \"grayLight\": \"#f3f4f6\",\n \"gray\": \"#9ca3af\",\n \"grayDark\": \"#374151\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#000000\",\n \"light\": \"#ffffff\"\n },\n \"dark\": {\n \"primaryLight\": \"#6ee7b7\",\n \"primary\": \"#10b981\",\n \"primaryDark\": \"#065f46\",\n \"secondaryLight\": \"#ddd6fe\",\n \"secondary\": \"#a78bfa\",\n \"secondaryDark\": \"#7c3aed\",\n \"tertiaryLight\": \"#fed7aa\",\n \"tertiary\": \"#fb923c\",\n \"tertiaryDark\": \"#ea580c\",\n \"grayLight\": \"#1f2937\",\n \"gray\": \"#6b7280\",\n \"grayDark\": \"#9ca3af\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#ffffff\",\n \"light\": \"#000000\"\n }\n}\n```\n\n<DemoTheme variant=\"green\" />\n\n## Yellow\n\n```json\n{\n \"default\": {\n \"primaryLight\": \"#fbbf24\",\n \"primary\": \"#f59e0b\",\n \"primaryDark\": \"#d97706\",\n \"secondaryLight\": \"#c4b5fd\",\n \"secondary\": \"#8b5cf6\",\n \"secondaryDark\": \"#5b21b6\",\n \"tertiaryLight\": \"#86efac\",\n \"tertiary\": \"#22c55e\",\n \"tertiaryDark\": \"#15803d\",\n \"grayLight\": \"#f3f4f6\",\n \"gray\": \"#9ca3af\",\n \"grayDark\": \"#374151\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#000000\",\n \"light\": \"#ffffff\"\n },\n \"dark\": {\n \"primaryLight\": \"#fed7aa\",\n \"primary\": \"#fb923c\",\n \"primaryDark\": \"#ea580c\",\n \"secondaryLight\": \"#ddd6fe\",\n \"secondary\": \"#a78bfa\",\n \"secondaryDark\": \"#7c3aed\",\n \"tertiaryLight\": \"#6ee7b7\",\n \"tertiary\": \"#10b981\",\n \"tertiaryDark\": \"#065f46\",\n \"grayLight\": \"#1f2937\",\n \"gray\": \"#6b7280\",\n \"grayDark\": \"#9ca3af\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#ffffff\",\n \"light\": \"#000000\"\n }\n}\n```\n\n<DemoTheme variant=\"yellow\" />";
1
+ export declare const themeMdxTemplate = "---\ntitle: \"Theme\"\ndescription: \"Customize the documentation UI colors with a theme.json file.\"\ndate: \"2026-02-19\"\nupdated: \"2026-08-04\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 7\n---\n# Theme\n\nDefine your site\u2019s color system with a `theme.json` file. This lets you tailor the look and feel of your documentation without changing content.\n\n## theme.json\n\nPlace a `theme.json` at your project root (the same directory where you execute `npx doccupine`). It supports multiple modes. Define a `default` mode and a `dark` mode.\n\n```json\n{\n \"default\": {\n \"primaryLight\": \"#93c5fd\",\n \"primary\": \"#2563eb\",\n \"primaryDark\": \"#1e40af\",\n \"secondaryLight\": \"#c4b5fd\",\n \"secondary\": \"#8b5cf6\",\n \"secondaryDark\": \"#5b21b6\",\n \"tertiaryLight\": \"#fbbf24\",\n \"tertiary\": \"#f59e0b\",\n \"tertiaryDark\": \"#d97706\",\n \"grayLight\": \"#f3f4f6\",\n \"gray\": \"#9ca3af\",\n \"grayDark\": \"#374151\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#000000\",\n \"light\": \"#ffffff\"\n },\n \"dark\": {\n \"primaryLight\": \"#9bcaff\",\n \"primary\": \"#1e7ae0\",\n \"primaryDark\": \"#033d7e\",\n \"secondaryLight\": \"#ddd6fe\",\n \"secondary\": \"#a78bfa\",\n \"secondaryDark\": \"#7c3aed\",\n \"tertiaryLight\": \"#fed7aa\",\n \"tertiary\": \"#fb923c\",\n \"tertiaryDark\": \"#ea580c\",\n \"grayLight\": \"#1f2937\",\n \"gray\": \"#6b7280\",\n \"grayDark\": \"#9ca3af\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#ffffff\",\n \"light\": \"#000000\"\n },\n \"logo\": {\n \"dark\": \"https://docs.doccupine.com/logo-dark.svg\",\n \"light\": \"https://docs.doccupine.com/logo-light.svg\"\n }\n}\n```\n\n## Modes\n\n- **default**: The base color palette for your site.\n- **dark**: Dark\u2011mode palette.\n\n## Fields\n\n- **primaryLight**: A lighter variant of your brand color, used for subtle accents and backgrounds.\n- **primary**: The main brand color.\n- **primaryDark**: A darker variant of your brand color for emphasis and hover states.\n- **secondaryLight**: A lighter variant of your secondary color, used for subtle accents and backgrounds.\n- **secondary**: The secondary brand color used for highlights and UI accents.\n- **secondaryDark**: A darker variant of your secondary color for emphasis and hover states.\n- **tertiaryLight**: A lighter variant of your tertiary color, used for subtle accents and backgrounds.\n- **tertiary**: The tertiary accent color.\n- **tertiaryDark**: A darker variant of your tertiary color for emphasis and hover states.\n- **grayLight**: Light gray for surfaces and borders.\n- **gray**: Neutral gray for text and UI elements.\n- **grayDark**: Dark gray for headings or high\u2011contrast text.\n- **success**: Positive/confirmation color.\n- **error**: Error/destructive color.\n- **warning**: Warning/attention color.\n- **info**: Informational/highlight color.\n- **dark**: The darkest/base color (often page background in dark mode).\n- **light**: The lightest/base color (often page background in light mode).\n- **logo.light**: Path or URL to the logo used on light backgrounds. Recommended size: 164\u00D730 px.\n- **logo.dark**: Path or URL to the logo used on dark backgrounds. Recommended size: 164\u00D730 px.\n\n## Behavior\n\n- **Placement**: Put `theme.json` in the project root alongside `config.json`.\n- **Partial palettes**: If a key is missing in a mode, consumers may fall back to the `default` value.\n- **Logo size**: Recommended dimensions are 164px width and 30px height.\n- **Browser chrome**: The `theme-color` shown in browser UI (such as the iOS Safari status bar) is derived from each mode's `primary` token, so it carries your brand color in both modes.\n\n<Callout type=\"warning\">\n Use valid hex colors (e.g., `#22c55e`). Invalid color values may cause unexpected rendering.\n</Callout>\n\n## Tips\n\n- **Contrast**: Ensure sufficient contrast between text and backgrounds for readability.\n- **Branding**: Start with your brand\u2019s `primary` color, then derive `primaryLight` and `primaryDark`.\n- **Iterate**: Adjust colors and refresh the site to preview changes quickly.\n\n# Demo\n\nIn the following demos, you can see how the theme can be changed. To override the theme, create a `theme.json` file in the project root and copy paste the code below.\n\n<DemoTheme variant=\"purple\" />\n<DemoTheme variant=\"green\" />\n<DemoTheme variant=\"yellow\" />\n<DemoTheme />\n\n## Purple\n\n```json\n{\n \"default\": {\n \"primaryLight\": \"#c4b5fd\",\n \"primary\": \"#8b5cf6\",\n \"primaryDark\": \"#5b21b6\",\n \"secondaryLight\": \"#86efac\",\n \"secondary\": \"#22c55e\",\n \"secondaryDark\": \"#15803d\",\n \"tertiaryLight\": \"#fbbf24\",\n \"tertiary\": \"#f59e0b\",\n \"tertiaryDark\": \"#d97706\",\n \"grayLight\": \"#f3f4f6\",\n \"gray\": \"#9ca3af\",\n \"grayDark\": \"#374151\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#000000\",\n \"light\": \"#ffffff\"\n },\n \"dark\": {\n \"primaryLight\": \"#ddd6fe\",\n \"primary\": \"#a78bfa\",\n \"primaryDark\": \"#7c3aed\",\n \"secondaryLight\": \"#6ee7b7\",\n \"secondary\": \"#10b981\",\n \"secondaryDark\": \"#065f46\",\n \"tertiaryLight\": \"#fed7aa\",\n \"tertiary\": \"#fb923c\",\n \"tertiaryDark\": \"#ea580c\",\n \"grayLight\": \"#1f2937\",\n \"gray\": \"#6b7280\",\n \"grayDark\": \"#9ca3af\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#ffffff\",\n \"light\": \"#000000\"\n }\n}\n```\n\n<DemoTheme variant=\"purple\" />\n\n## Green\n\n```json\n{\n \"default\": {\n \"primaryLight\": \"#86efac\",\n \"primary\": \"#22c55e\",\n \"primaryDark\": \"#15803d\",\n \"secondaryLight\": \"#c4b5fd\",\n \"secondary\": \"#8b5cf6\",\n \"secondaryDark\": \"#5b21b6\",\n \"tertiaryLight\": \"#fbbf24\",\n \"tertiary\": \"#f59e0b\",\n \"tertiaryDark\": \"#d97706\",\n \"grayLight\": \"#f3f4f6\",\n \"gray\": \"#9ca3af\",\n \"grayDark\": \"#374151\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#000000\",\n \"light\": \"#ffffff\"\n },\n \"dark\": {\n \"primaryLight\": \"#6ee7b7\",\n \"primary\": \"#10b981\",\n \"primaryDark\": \"#065f46\",\n \"secondaryLight\": \"#ddd6fe\",\n \"secondary\": \"#a78bfa\",\n \"secondaryDark\": \"#7c3aed\",\n \"tertiaryLight\": \"#fed7aa\",\n \"tertiary\": \"#fb923c\",\n \"tertiaryDark\": \"#ea580c\",\n \"grayLight\": \"#1f2937\",\n \"gray\": \"#6b7280\",\n \"grayDark\": \"#9ca3af\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#ffffff\",\n \"light\": \"#000000\"\n }\n}\n```\n\n<DemoTheme variant=\"green\" />\n\n## Yellow\n\n```json\n{\n \"default\": {\n \"primaryLight\": \"#fbbf24\",\n \"primary\": \"#f59e0b\",\n \"primaryDark\": \"#d97706\",\n \"secondaryLight\": \"#c4b5fd\",\n \"secondary\": \"#8b5cf6\",\n \"secondaryDark\": \"#5b21b6\",\n \"tertiaryLight\": \"#86efac\",\n \"tertiary\": \"#22c55e\",\n \"tertiaryDark\": \"#15803d\",\n \"grayLight\": \"#f3f4f6\",\n \"gray\": \"#9ca3af\",\n \"grayDark\": \"#374151\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#000000\",\n \"light\": \"#ffffff\"\n },\n \"dark\": {\n \"primaryLight\": \"#fed7aa\",\n \"primary\": \"#fb923c\",\n \"primaryDark\": \"#ea580c\",\n \"secondaryLight\": \"#ddd6fe\",\n \"secondary\": \"#a78bfa\",\n \"secondaryDark\": \"#7c3aed\",\n \"tertiaryLight\": \"#6ee7b7\",\n \"tertiary\": \"#10b981\",\n \"tertiaryDark\": \"#065f46\",\n \"grayLight\": \"#1f2937\",\n \"gray\": \"#6b7280\",\n \"grayDark\": \"#9ca3af\",\n \"success\": \"#10b981\",\n \"error\": \"#f43f5e\",\n \"warning\": \"#f59e0b\",\n \"info\": \"#3b82f6\",\n \"dark\": \"#ffffff\",\n \"light\": \"#000000\"\n }\n}\n```\n\n<DemoTheme variant=\"yellow\" />";
@@ -5,7 +5,7 @@ date: "2026-02-19"
5
5
  updated: "2026-08-04"
6
6
  category: "Configuration"
7
7
  categoryOrder: 2
8
- order: 5
8
+ order: 7
9
9
  ---
10
10
  # Theme
11
11
 
@@ -0,0 +1 @@
1
+ export declare const versionsMdxTemplate = "---\ntitle: \"Versions\"\ndescription: \"Keep the documentation of earlier releases online next to the current one, with a version switcher and scoped search.\"\ndate: \"2026-09-08\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 5\n---\n# Versions\n\nPublish the documentation of earlier releases alongside the current one by adding a `versions.json` file and one folder per older version. Each version gets its own URL prefix, its own sidebar, a switcher in the sidebar, and search and AI chat scoped to the version the reader is looking at.\n\n<Callout type=\"note\">\n Versions are entirely opt-in. Without a `versions.json` file nothing changes.\n</Callout>\n\n## Configuration\n\nCreate `versions.json` in your project root, next to `doccupine.json`:\n\n```json\n[\n { \"label\": \"v2.0\", \"default\": true },\n { \"slug\": \"v1\", \"label\": \"v1.0\" }\n]\n```\n\n- **label**: the name shown in the version switcher.\n- **default**: exactly one entry must be the default. It is the version at the docs root, published at unprefixed URLs, and it has no `slug`.\n- **slug**: for every other version, a lowercase URL segment (`v1`, `2024-10`) that is both the folder name and the URL prefix.\n\nThe order of the entries is the order of the switcher.\n\n## Folder layout\n\nThe default version is the docs root. Every other version is a folder named after its slug that holds a complete copy of the docs as they were:\n\n```text\ndocs/\n index.mdx -> / (v2.0, the default)\n guides/\n intro.mdx -> /guides/intro\n v1/\n index.mdx -> /v1\n guides/\n intro.mdx -> /v1/guides/intro\n```\n\nTo freeze the current docs as a version, copy the docs root (without any language or version folders) into a new folder, add the entry to `versions.json`, and keep editing the root as the next release. A version folder without an `index.mdx` gets a generated home page that redirects to its first page.\n\n## What the generated site does\n\n- **Switcher**: the sidebar footer row, between the focus-mode and theme toggles, shows a version dropdown when at least two versions are configured, right after the language dropdown when both exist: the same 30px pill and menu, listing every version. Switching goes to the same page in the chosen version when it exists, otherwise to that version's home.\n- **Sidebar and sections**: the sidebar lists only the pages of the current version. [Sections](/sections) work inside every version.\n- **Search and AI chat**: results and answers come from the current version only. The MCP server's `search_docs` and `list_docs` tools accept a `version` parameter and default to the default version.\n- **Agents**: each version has its own `llms.txt` and `llms-full.txt` under its prefix (`/v1/llms.txt`), and the root files link to them.\n\n## Navigation\n\nFrontmatter navigation is built per version automatically. To define a version's sidebar by hand, key `navigation.json` by URL prefix: `\"v1\"` for the root of v1, `\"v1/api\"` for its API section. See [Navigation](/navigation).\n\n## Versions and languages\n\nVersions and [languages](/languages) combine. The language folder comes first, then the version folder:\n\n```text\ndocs/\n guides/intro.mdx -> /guides/intro (default language, default version)\n v1/guides/intro.mdx -> /v1/guides/intro (default language, v1)\n de/guides/intro.mdx -> /de/guides/intro (German, default version)\n de/v1/guides/intro.mdx -> /de/v1/guides/intro (German, v1)\n```\n\n## Rules\n\n- A version slug must not be the slug of a [section](/sections), the first folder of a section's `directory`, a language code, or one of the reserved segments `api`, `gate`, `mcp`, and `ingest`. The build stops with a message naming the file when it is.\n- The API reference generated from an OpenAPI spec is published in the default version only. Hand-written pages inside a version folder work like any other page.\n";
@@ -0,0 +1,78 @@
1
+ export const versionsMdxTemplate = `---
2
+ title: "Versions"
3
+ description: "Keep the documentation of earlier releases online next to the current one, with a version switcher and scoped search."
4
+ date: "2026-09-08"
5
+ category: "Configuration"
6
+ categoryOrder: 2
7
+ order: 5
8
+ ---
9
+ # Versions
10
+
11
+ Publish the documentation of earlier releases alongside the current one by adding a \`versions.json\` file and one folder per older version. Each version gets its own URL prefix, its own sidebar, a switcher in the sidebar, and search and AI chat scoped to the version the reader is looking at.
12
+
13
+ <Callout type="note">
14
+ Versions are entirely opt-in. Without a \`versions.json\` file nothing changes.
15
+ </Callout>
16
+
17
+ ## Configuration
18
+
19
+ Create \`versions.json\` in your project root, next to \`doccupine.json\`:
20
+
21
+ \`\`\`json
22
+ [
23
+ { "label": "v2.0", "default": true },
24
+ { "slug": "v1", "label": "v1.0" }
25
+ ]
26
+ \`\`\`
27
+
28
+ - **label**: the name shown in the version switcher.
29
+ - **default**: exactly one entry must be the default. It is the version at the docs root, published at unprefixed URLs, and it has no \`slug\`.
30
+ - **slug**: for every other version, a lowercase URL segment (\`v1\`, \`2024-10\`) that is both the folder name and the URL prefix.
31
+
32
+ The order of the entries is the order of the switcher.
33
+
34
+ ## Folder layout
35
+
36
+ The default version is the docs root. Every other version is a folder named after its slug that holds a complete copy of the docs as they were:
37
+
38
+ \`\`\`text
39
+ docs/
40
+ index.mdx -> / (v2.0, the default)
41
+ guides/
42
+ intro.mdx -> /guides/intro
43
+ v1/
44
+ index.mdx -> /v1
45
+ guides/
46
+ intro.mdx -> /v1/guides/intro
47
+ \`\`\`
48
+
49
+ To freeze the current docs as a version, copy the docs root (without any language or version folders) into a new folder, add the entry to \`versions.json\`, and keep editing the root as the next release. A version folder without an \`index.mdx\` gets a generated home page that redirects to its first page.
50
+
51
+ ## What the generated site does
52
+
53
+ - **Switcher**: the sidebar footer row, between the focus-mode and theme toggles, shows a version dropdown when at least two versions are configured, right after the language dropdown when both exist: the same 30px pill and menu, listing every version. Switching goes to the same page in the chosen version when it exists, otherwise to that version's home.
54
+ - **Sidebar and sections**: the sidebar lists only the pages of the current version. [Sections](/sections) work inside every version.
55
+ - **Search and AI chat**: results and answers come from the current version only. The MCP server's \`search_docs\` and \`list_docs\` tools accept a \`version\` parameter and default to the default version.
56
+ - **Agents**: each version has its own \`llms.txt\` and \`llms-full.txt\` under its prefix (\`/v1/llms.txt\`), and the root files link to them.
57
+
58
+ ## Navigation
59
+
60
+ Frontmatter navigation is built per version automatically. To define a version's sidebar by hand, key \`navigation.json\` by URL prefix: \`"v1"\` for the root of v1, \`"v1/api"\` for its API section. See [Navigation](/navigation).
61
+
62
+ ## Versions and languages
63
+
64
+ Versions and [languages](/languages) combine. The language folder comes first, then the version folder:
65
+
66
+ \`\`\`text
67
+ docs/
68
+ guides/intro.mdx -> /guides/intro (default language, default version)
69
+ v1/guides/intro.mdx -> /v1/guides/intro (default language, v1)
70
+ de/guides/intro.mdx -> /de/guides/intro (German, default version)
71
+ de/v1/guides/intro.mdx -> /de/v1/guides/intro (German, v1)
72
+ \`\`\`
73
+
74
+ ## Rules
75
+
76
+ - A version slug must not be the slug of a [section](/sections), the first folder of a section's \`directory\`, a language code, or one of the reserved segments \`api\`, \`gate\`, \`mcp\`, and \`ingest\`. The build stops with a message naming the file when it is.
77
+ - The API reference generated from an OpenAPI spec is published in the default version only. Hand-written pages inside a version folder work like any other page.
78
+ `;