doccupine 0.0.140 → 0.0.141

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 (145) hide show
  1. package/README.md +14 -7
  2. package/dist/cli.d.ts +1 -0
  3. package/dist/cli.js +191 -0
  4. package/dist/index.d.ts +3 -7
  5. package/dist/index.js +5 -1894
  6. package/dist/lib/config-manager.d.ts +1 -0
  7. package/dist/lib/config-manager.js +63 -3
  8. package/dist/lib/generated-artifacts.d.ts +26 -0
  9. package/dist/lib/generated-artifacts.js +147 -0
  10. package/dist/lib/layout.js +30 -30
  11. package/dist/lib/metadata.js +58 -30
  12. package/dist/lib/openapi-types.d.ts +2 -2
  13. package/dist/lib/openapi.d.ts +6 -3
  14. package/dist/lib/openapi.js +330 -50
  15. package/dist/lib/output-safety.d.ts +15 -0
  16. package/dist/lib/output-safety.js +428 -0
  17. package/dist/lib/structures.js +11 -0
  18. package/dist/lib/utils.d.ts +10 -5
  19. package/dist/lib/utils.js +108 -5
  20. package/dist/mdx-to-nextjs-generator.d.ts +166 -0
  21. package/dist/mdx-to-nextjs-generator.js +2229 -0
  22. package/dist/templates/app/api/gate/route.d.ts +1 -1
  23. package/dist/templates/app/api/gate/route.js +18 -6
  24. package/dist/templates/app/api/mcp/route.d.ts +1 -1
  25. package/dist/templates/app/api/mcp/route.js +181 -111
  26. package/dist/templates/app/api/playground/route.d.ts +1 -1
  27. package/dist/templates/app/api/playground/route.js +45 -13
  28. package/dist/templates/app/api/rag/route.d.ts +1 -1
  29. package/dist/templates/app/api/rag/route.js +72 -20
  30. package/dist/templates/app/api/search/route.d.ts +1 -1
  31. package/dist/templates/app/api/search/route.js +5 -0
  32. package/dist/templates/app/robots.d.ts +1 -1
  33. package/dist/templates/app/robots.js +1 -26
  34. package/dist/templates/app/theme.d.ts +1 -1
  35. package/dist/templates/app/theme.js +31 -19
  36. package/dist/templates/components/Chat.d.ts +1 -1
  37. package/dist/templates/components/Chat.js +342 -34
  38. package/dist/templates/components/SearchDocs.d.ts +1 -1
  39. package/dist/templates/components/SearchDocs.js +63 -11
  40. package/dist/templates/components/SearchModalContent.d.ts +1 -1
  41. package/dist/templates/components/SearchModalContent.js +191 -49
  42. package/dist/templates/components/SideBar.d.ts +1 -1
  43. package/dist/templates/components/SideBar.js +8 -2
  44. package/dist/templates/components/layout/Accordion.d.ts +1 -1
  45. package/dist/templates/components/layout/Accordion.js +26 -3
  46. package/dist/templates/components/layout/Badge.d.ts +1 -1
  47. package/dist/templates/components/layout/Badge.js +1 -1
  48. package/dist/templates/components/layout/Button.d.ts +1 -1
  49. package/dist/templates/components/layout/Button.js +4 -4
  50. package/dist/templates/components/layout/Callout.d.ts +1 -1
  51. package/dist/templates/components/layout/Callout.js +6 -6
  52. package/dist/templates/components/layout/Card.d.ts +1 -1
  53. package/dist/templates/components/layout/Card.js +9 -4
  54. package/dist/templates/components/layout/CherryThemeProvider.d.ts +1 -1
  55. package/dist/templates/components/layout/CherryThemeProvider.js +63 -12
  56. package/dist/templates/components/layout/Code.d.ts +1 -1
  57. package/dist/templates/components/layout/Code.js +5 -5
  58. package/dist/templates/components/layout/CopyButton.d.ts +1 -1
  59. package/dist/templates/components/layout/CopyButton.js +1 -1
  60. package/dist/templates/components/layout/DemoTheme.d.ts +1 -1
  61. package/dist/templates/components/layout/DemoTheme.js +8 -28
  62. package/dist/templates/components/layout/DocsComponents.d.ts +1 -1
  63. package/dist/templates/components/layout/DocsComponents.js +57 -6
  64. package/dist/templates/components/layout/GlobalStyles.d.ts +1 -1
  65. package/dist/templates/components/layout/GlobalStyles.js +15 -9
  66. package/dist/templates/components/layout/Prompt.d.ts +1 -1
  67. package/dist/templates/components/layout/Prompt.js +4 -7
  68. package/dist/templates/components/layout/Steps.d.ts +1 -1
  69. package/dist/templates/components/layout/Steps.js +7 -1
  70. package/dist/templates/components/layout/Tabs.d.ts +1 -1
  71. package/dist/templates/components/layout/Tabs.js +108 -19
  72. package/dist/templates/env.example.d.ts +1 -1
  73. package/dist/templates/env.example.js +11 -0
  74. package/dist/templates/eslint.config.d.ts +1 -1
  75. package/dist/templates/eslint.config.js +20 -0
  76. package/dist/templates/gitignore.d.ts +1 -1
  77. package/dist/templates/gitignore.js +4 -3
  78. package/dist/templates/lib/access.d.ts +1 -0
  79. package/dist/templates/lib/access.js +41 -0
  80. package/dist/templates/mdx/ai-assistant.mdx.d.ts +1 -1
  81. package/dist/templates/mdx/ai-assistant.mdx.js +17 -1
  82. package/dist/templates/mdx/api-playground.mdx.d.ts +1 -1
  83. package/dist/templates/mdx/api-playground.mdx.js +5 -3
  84. package/dist/templates/mdx/authentication.mdx.d.ts +1 -1
  85. package/dist/templates/mdx/authentication.mdx.js +5 -3
  86. package/dist/templates/mdx/commands.mdx.d.ts +1 -1
  87. package/dist/templates/mdx/commands.mdx.js +20 -6
  88. package/dist/templates/mdx/components.mdx.d.ts +1 -1
  89. package/dist/templates/mdx/components.mdx.js +3 -0
  90. package/dist/templates/mdx/deployment-and-hosting.mdx.d.ts +1 -1
  91. package/dist/templates/mdx/deployment-and-hosting.mdx.js +2 -2
  92. package/dist/templates/mdx/globals.mdx.d.ts +1 -1
  93. package/dist/templates/mdx/globals.mdx.js +14 -11
  94. package/dist/templates/mdx/model-context-protocol.mdx.d.ts +1 -1
  95. package/dist/templates/mdx/model-context-protocol.mdx.js +22 -35
  96. package/dist/templates/mdx/platform/ai-assistant.mdx.d.ts +1 -1
  97. package/dist/templates/mdx/platform/ai-assistant.mdx.js +23 -0
  98. package/dist/templates/mdx/platform/api-playground.mdx.d.ts +1 -1
  99. package/dist/templates/mdx/platform/api-playground.mdx.js +7 -0
  100. package/dist/templates/mdx/platform/authentication.mdx.d.ts +1 -0
  101. package/dist/templates/mdx/platform/authentication.mdx.js +63 -0
  102. package/dist/templates/mdx/platform/import-from-github.mdx.d.ts +1 -1
  103. package/dist/templates/mdx/platform/import-from-github.mdx.js +2 -2
  104. package/dist/templates/mdx/platform/index.mdx.d.ts +1 -1
  105. package/dist/templates/mdx/platform/index.mdx.js +1 -0
  106. package/dist/templates/mdx/platform/mcp.mdx.d.ts +1 -1
  107. package/dist/templates/mdx/platform/mcp.mdx.js +2 -1
  108. package/dist/templates/mdx/platform/navigation-settings.mdx.d.ts +1 -1
  109. package/dist/templates/mdx/platform/navigation-settings.mdx.js +12 -1
  110. package/dist/templates/mdx/platform/publishing.mdx.d.ts +1 -1
  111. package/dist/templates/mdx/platform/publishing.mdx.js +43 -10
  112. package/dist/templates/mdx/platform/self-updating-docs.mdx.d.ts +1 -1
  113. package/dist/templates/mdx/platform/self-updating-docs.mdx.js +48 -9
  114. package/dist/templates/mdx/sections.mdx.d.ts +1 -1
  115. package/dist/templates/mdx/sections.mdx.js +4 -0
  116. package/dist/templates/mdx/space.mdx.d.ts +1 -0
  117. package/dist/templates/mdx/space.mdx.js +125 -0
  118. package/dist/templates/mdx/tabs.mdx.d.ts +1 -1
  119. package/dist/templates/mdx/tabs.mdx.js +4 -0
  120. package/dist/templates/next.config.js +20 -8
  121. package/dist/templates/package.js +3 -3
  122. package/dist/templates/prettierignore.d.ts +1 -1
  123. package/dist/templates/prettierignore.js +1 -0
  124. package/dist/templates/proxy.js +47 -19
  125. package/dist/templates/scripts/build-docs-index.d.ts +1 -1
  126. package/dist/templates/scripts/build-docs-index.js +1 -0
  127. package/dist/templates/services/mcp/docsContentStub.d.ts +1 -0
  128. package/dist/templates/services/mcp/docsContentStub.js +1 -0
  129. package/dist/templates/services/mcp/server.d.ts +1 -1
  130. package/dist/templates/services/mcp/server.js +140 -83
  131. package/dist/templates/services/mcp/tools.d.ts +1 -1
  132. package/dist/templates/services/mcp/tools.js +65 -137
  133. package/dist/templates/utils/playgroundAllowlist.d.ts +1 -1
  134. package/dist/templates/utils/playgroundAllowlist.js +13 -4
  135. package/dist/templates/utils/rateLimit.d.ts +1 -1
  136. package/dist/templates/utils/rateLimit.js +40 -3
  137. package/dist/templates/utils/requestBody.d.ts +1 -0
  138. package/dist/templates/utils/requestBody.js +56 -0
  139. package/dist/templates/utils/ssrfGuard.d.ts +1 -1
  140. package/dist/templates/utils/ssrfGuard.js +138 -33
  141. package/package.json +14 -9
  142. package/dist/lib/mdxToMarkdown.d.ts +0 -1
  143. package/dist/lib/mdxToMarkdown.js +0 -134
  144. package/dist/templates/mdx/image-and-embeds.mdx.d.ts +0 -1
  145. package/dist/templates/mdx/image-and-embeds.mdx.js +0 -118
@@ -1 +1 @@
1
- export declare const platformImportFromGithubMdxTemplate = "---\ntitle: \"Import from GitHub\"\ndescription: \"Paste a GitHub repository and let Doccupine's AI write a complete documentation site from your code.\"\ndate: \"2026-07-24\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\norder: 2\nsection: \"Platform\"\n---\n# Import from GitHub\n\nInstead of starting from a blank project, you can point Doccupine at a GitHub repository and have it write the documentation for you. The AI reads your actual source code - not a template - and produces a complete, multi-page MDX site that is deployed and ready to edit.\n\nStart at [doccupine.com/import](https://doccupine.com/import) and paste any GitHub repository URL.\n\n<Callout type=\"note\">\n Any of these formats work: `github.com/owner/repo`, the full `https://` URL, or just `owner/repo`.\n</Callout>\n\n## How it works\n\n<Steps>\n <Step title=\"Paste your repository\">\n Enter the repo URL. If you're not signed in yet, you'll be sent to sign-up first - your repository is remembered, and the import starts on its own once your account is ready. Signing up starts your free 30-day trial and needs no credit card.\n </Step>\n <Step title=\"Choose where the code lives\">\n Pick whether Doccupine manages the new documentation repository for you or creates it on your own GitHub account. This is the same choice described in [Creating a Project](/platform/creating-a-project).\n </Step>\n <Step title=\"Watch it build\">\n A live progress view walks through five stages: **Validate**, **Read repo**, **Plan**, **Write pages**, and **Publish**. You can close the tab - the import keeps running.\n </Step>\n <Step title=\"Open your docs\">\n When the run finishes you're taken straight to the new project, with the site already live.\n </Step>\n</Steps>\n\n## What each stage does\n\n| Stage | What happens |\n| --------------- | ------------------------------------------------------------------------------------------- |\n| **Validate** | Confirms the repository exists and that Doccupine can read it |\n| **Read repo** | Downloads and scans the source files, selecting the ones that best describe the project |\n| **Plan** | Drafts the page outline - sections, titles, and ordering |\n| **Write pages** | Writes each page as MDX, validating every one before it ships |\n| **Publish** | Creates the repository, commits the docs, and deploys the site |\n\n## Private repositories\n\nPublic repositories work straight away. For a private one, connect your GitHub account first - Doccupine then reads the repo with your own credentials.\n\nIf you start an import on a repository Doccupine can't reach, the progress page offers a **Connect GitHub** button. Once you've connected, the import picks up automatically where it left off.\n\n## Cancelling an import\n\nWhile the run is still reading, planning, or writing, a **Cancel import** link is available on the progress page. Nothing has been created on GitHub or your hosting at that point, so cancelling leaves no trace behind.\n\nOnce the run reaches the publishing stage it can no longer be cancelled - by then the repository and deployment are being created.\n\n## Email notifications\n\nA full import can take a few minutes, so you don't have to sit and watch it. Doccupine emails you when the run finishes, with the page count and a link to your new site - or, if something went wrong after the repository was read, an email explaining why.\n\n## What you get\n\n- A **multi-page MDX site** with sections, categories, and navigation already filled in\n- Pages written from your real source files, not boilerplate\n- A **live deployment** you can visit immediately\n- Every page **linked back to the code it came from**, so [Self-updating Docs](/platform/self-updating-docs) can keep it current from day one\n\n<Callout type=\"success\">\n Nothing about an imported site is locked down. Open any page in the [file editor](/platform/file-editor), change whatever you like, and [publish](/platform/publishing) as usual.\n</Callout>\n\n## Limits\n\nDoccupine reads a bounded number of files and writes a bounded number of pages, so an enormous monorepo produces a solid starting set rather than an endless run. Very large or very sparse repositories may need a few manual pages afterwards.\n\n<Callout type=\"note\">\n The initial generation is on us. It does **not** draw down your project's AI assistant budget, which is reserved for your deployed site's assistant. See [AI Assistant](/platform/ai-assistant) for those budgets.\n</Callout>\n\n## After the import\n\n<Columns cols={2}>\n <Card title=\"Edit your pages\" icon=\"pencil\" href=\"/platform/file-editor\">\n Rewrite, restructure, and add pages in the browser-based editor.\n </Card>\n <Card title=\"Keep them current\" icon=\"refresh-cw\" href=\"/platform/self-updating-docs\">\n Let the agent rewrite pages when the code they document changes.\n </Card>\n</Columns>";
1
+ export declare const platformImportFromGithubMdxTemplate = "---\ntitle: \"Import from GitHub\"\ndescription: \"Paste a GitHub repository and let Doccupine's AI write a complete documentation site from your code.\"\ndate: \"2026-07-24\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\norder: 2\nsection: \"Platform\"\n---\n# Import from GitHub\n\nInstead of starting from a blank project, you can point Doccupine at a GitHub repository and have it write the documentation for you. The AI reads your actual source code - not a template - and produces a complete, multi-page MDX site that is deployed and ready to edit.\n\nStart at [doccupine.com/import](https://doccupine.com/import) and paste any GitHub repository URL.\n\n<Callout type=\"note\">\n Any of these formats work: `github.com/owner/repo`, the full `https://` URL, or just `owner/repo`.\n</Callout>\n\n## How it works\n\n<Steps>\n <Step title=\"Paste your repository\">\n Enter the repo URL. If you're not signed in yet, you'll be sent to sign-up first - your repository is remembered, and the import starts on its own once your account is ready. Signing up starts your free 30-day trial and needs no credit card.\n </Step>\n <Step title=\"Choose where the code lives\">\n Pick whether Doccupine manages the new documentation repository for you or creates it on your own GitHub account. This is the same choice described in [Creating a Project](/platform/creating-a-project).\n </Step>\n <Step title=\"Watch it build\">\n A live progress view walks through five stages: **Validate**, **Read repo**, **Plan**, **Write pages**, and **Publish**. You can close the tab - the import keeps running.\n </Step>\n <Step title=\"Open your docs\">\n When the run finishes you're taken straight to the new project, with the site already live.\n </Step>\n</Steps>\n\n## What each stage does\n\n| Stage | What happens |\n| --------------- | ------------------------------------------------------------------------------------------- |\n| **Validate** | Confirms the repository exists and that Doccupine can read it |\n| **Read repo** | Downloads and scans the source files, selecting the ones that best describe the project |\n| **Plan** | Drafts the page outline - sections, titles, and ordering |\n| **Write pages** | Writes each page as MDX, validating every one before it ships |\n| **Publish** | Creates the repository, commits the docs, and deploys the site |\n\n## Private repositories\n\nPublic repositories work straight away. For a private one, connect your GitHub account first - Doccupine then reads the repo with your own credentials.\n\nIf you start an import on a repository Doccupine can't reach, the progress page offers a **Connect GitHub** button. Once you've connected, the import picks up automatically where it left off.\n\n## Cancelling an import\n\nWhile the run is still reading, planning, or writing, a **Cancel import** link is available on the progress page. Nothing has been created on GitHub or your hosting at that point, so cancelling leaves no trace behind.\n\nOnce the run reaches the publishing stage it can no longer be cancelled - by then the repository and deployment are being created.\n\n## Email notifications\n\nA full import can take a few minutes, so you don't have to sit and watch it. Doccupine emails you when the run finishes, with the page count and a link to your new site - or, if something went wrong after the repository was read, an email explaining why.\n\n## What you get\n\n- A **multi-page MDX site** with sections, categories, and navigation already filled in\n- Pages written from your real source files, not boilerplate\n- A **live deployment** you can visit immediately\n- Every page **linked back to the code it came from**, so [Agent Sync](/platform/self-updating-docs) can keep it current from day one\n\n<Callout type=\"success\">\n Nothing about an imported site is locked down. Open any page in the [file editor](/platform/file-editor), change whatever you like, and [publish](/platform/publishing) as usual.\n</Callout>\n\n## Limits\n\nDoccupine reads a bounded number of files and writes a bounded number of pages, so an enormous monorepo produces a solid starting set rather than an endless run. Very large or very sparse repositories may need a few manual pages afterwards.\n\n<Callout type=\"note\">\n The initial generation is on us. It does **not** draw down your project's AI assistant budget, which is reserved for your deployed site's assistant. See [AI Assistant](/platform/ai-assistant) for those budgets.\n</Callout>\n\n## After the import\n\n<Columns cols={2}>\n <Card title=\"Edit your pages\" icon=\"pencil\" href=\"/platform/file-editor\">\n Rewrite, restructure, and add pages in the browser-based editor.\n </Card>\n <Card title=\"Keep them current\" icon=\"refresh-cw\" href=\"/platform/self-updating-docs\">\n Agent Sync rewrites pages when the code they document changes.\n </Card>\n</Columns>";
@@ -65,7 +65,7 @@ A full import can take a few minutes, so you don't have to sit and watch it. Doc
65
65
  - A **multi-page MDX site** with sections, categories, and navigation already filled in
66
66
  - Pages written from your real source files, not boilerplate
67
67
  - A **live deployment** you can visit immediately
68
- - Every page **linked back to the code it came from**, so [Self-updating Docs](/platform/self-updating-docs) can keep it current from day one
68
+ - Every page **linked back to the code it came from**, so [Agent Sync](/platform/self-updating-docs) can keep it current from day one
69
69
 
70
70
  <Callout type="success">
71
71
  Nothing about an imported site is locked down. Open any page in the [file editor](/platform/file-editor), change whatever you like, and [publish](/platform/publishing) as usual.
@@ -86,6 +86,6 @@ Doccupine reads a bounded number of files and writes a bounded number of pages,
86
86
  Rewrite, restructure, and add pages in the browser-based editor.
87
87
  </Card>
88
88
  <Card title="Keep them current" icon="refresh-cw" href="/platform/self-updating-docs">
89
- Let the agent rewrite pages when the code they document changes.
89
+ Agent Sync rewrites pages when the code they document changes.
90
90
  </Card>
91
91
  </Columns>`;
@@ -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- **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, 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>";
@@ -16,6 +16,7 @@ The Doccupine platform gives you everything you need to create, customize, and h
16
16
 
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
+ - **Agent Sync** to link pages to the code they document and rewrite them when it changes
19
20
  - **Visual configuration** for themes, navigation, fonts, links, and more
20
21
  - **Custom domains** with automatic HTTPS
21
22
  - **AI assistant** built into every deployed site
@@ -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\"\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\nBy default your MCP endpoint is publicly accessible. You can restrict access with an 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\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>";
@@ -2,6 +2,7 @@ export const platformMcpMdxTemplate = `---
2
2
  title: "MCP"
3
3
  description: "Connect external AI apps like Claude and Cursor to your documentation with a Model Context Protocol server, and protect it with an API key."
4
4
  date: "2026-07-12"
5
+ updated: "2026-07-30"
5
6
  category: "AI & Integrations"
6
7
  categoryOrder: 3
7
8
  order: 1
@@ -35,7 +36,7 @@ Every snippet points to your site's own MCP endpoint, for example:
35
36
 
36
37
  ## MCP server authentication
37
38
 
38
- By default your MCP endpoint is publicly accessible. You can restrict access with an API key:
39
+ On 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:
39
40
 
40
41
  1. Enable **Require API key for MCP access**.
41
42
  2. Enter an API key.
@@ -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\"\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### 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.\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## 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\n**Sections** (`sections.json`):\n\n```json\n[\n { \"label\": \"Docs\", \"slug\": \"\" },\n { \"label\": \"API Reference\", \"slug\": \"api\" }\n]\n```";
@@ -2,6 +2,7 @@ export const platformNavigationSettingsMdxTemplate = `---
2
2
  title: "Navigation Settings"
3
3
  description: "Define the sidebar structure for your documentation site using the drag-and-drop Navigation Builder."
4
4
  date: "2026-07-06"
5
+ updated: "2026-07-30"
5
6
  category: "Configuration"
6
7
  categoryOrder: 2
7
8
  order: 2
@@ -33,14 +34,24 @@ You can reorder items at every level by dragging their handles:
33
34
  - Click the **edit** button on a section header to open its edit modal, where you can update the label, slug, and directory.
34
35
  - Delete a section from its edit modal using the delete button. The root section cannot be deleted.
35
36
 
37
+ ### Slug rules
38
+
39
+ A 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.
40
+
41
+ Doccupine 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.
42
+
36
43
  ### The default section
37
44
 
38
- One 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.
45
+ One 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.
39
46
 
40
47
  ### Frontmatter-based sections
41
48
 
42
49
  You 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.
43
50
 
51
+ <Callout type="note">
52
+ 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.
53
+ </Callout>
54
+
44
55
  ## Managing categories
45
56
 
46
57
  - Click **Add Category** within a section to create a new group
@@ -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\"\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. A badge shows the number of pending changes.\n3. Review the list of modified, deleted, and new files in the publish modal.\n4. Optionally write a custom commit message (defaults to \"Update docs via Doccupine\").\n5. Click **Publish Changes**.\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 in the project header updates as your site builds. It cycles through **queued**, **building**, and **ready** (or **error** if something went wrong).\n</Callout>\n\n## Discarding changes\n\nIf you want to undo your pending edits, click **Discard All Changes** in the publish modal. This removes all staged changes without committing anything.\n\n## File status badges\n\nIn the publish modal, each file shows a badge indicating what changed:\n\n- **mod** - the file was modified\n- **del** - the file was deleted\n- **bin** - the file is a binary asset (image, font, etc.)\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-07-30\"\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### A spec file that will not be there\n\nIf your `doccupine.json` names an OpenAPI spec in its `openapi` field, that spec has to exist in the repository after the publish. The usual way to get this wrong is to publish the config change while leaving the spec file behind in your pending changes - publish both together, or remove the `openapi` field.\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\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## 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.";
@@ -2,6 +2,7 @@ export const platformPublishingMdxTemplate = `---
2
2
  title: "Publishing Changes"
3
3
  description: "Commit your edits to GitHub and deploy your documentation site with one click."
4
4
  date: "2026-02-19"
5
+ updated: "2026-07-30"
5
6
  category: "Editing"
6
7
  categoryOrder: 1
7
8
  order: 1
@@ -14,10 +15,10 @@ When you edit files in Doccupine, your changes are staged as pending. Nothing go
14
15
  ## The publish workflow
15
16
 
16
17
  1. Make edits to your files using the file editor.
17
- 2. Click the **Publish** button in the project header. A badge shows the number of pending changes.
18
- 3. Review the list of modified, deleted, and new files in the publish modal.
19
- 4. Optionally write a custom commit message (defaults to "Update docs via Doccupine").
20
- 5. Click **Publish Changes**.
18
+ 2. 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.
19
+ 3. 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.
20
+ 4. 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\`.
21
+ 5. Click **Deploy**.
21
22
 
22
23
  Doccupine then:
23
24
 
@@ -26,20 +27,52 @@ Doccupine then:
26
27
  - Clears all pending changes from the staging area
27
28
 
28
29
  <Callout type="note">
29
- The deployment status badge in the project header updates as your site builds. It cycles through **queued**, **building**, and **ready** (or **error** if something went wrong).
30
+ 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).
31
+ </Callout>
32
+
33
+ ## Checks before a publish
34
+
35
+ A 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.
36
+
37
+ ### A spec file that will not be there
38
+
39
+ If your \`doccupine.json\` names an OpenAPI spec in its \`openapi\` field, that spec has to exist in the repository after the publish. The usual way to get this wrong is to publish the config change while leaving the spec file behind in your pending changes - publish both together, or remove the \`openapi\` field.
40
+
41
+ ### Two pages on the same URL
42
+
43
+ Two 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.
44
+
45
+ ### Section names that become the same URL
46
+
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
+
49
+ <Callout type="note">
50
+ 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.
30
51
  </Callout>
31
52
 
32
53
  ## Discarding changes
33
54
 
34
- If you want to undo your pending edits, click **Discard All Changes** in the publish modal. This removes all staged changes without committing anything.
55
+ You can throw away as much or as little as you like:
56
+
57
+ - **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.
58
+ - **A whole file** - **Discard this file's change** on its row in the change set returns the file to whatever is in your repository.
59
+ - **Everything** - **Discard all**, above the change set, clears the staging area without committing anything.
60
+
61
+ If discarding leaves a file identical to what is already committed, it drops out of the change set on its own.
62
+
63
+ <Callout type="note">
64
+ 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.
65
+ </Callout>
35
66
 
36
67
  ## File status badges
37
68
 
38
- In the publish modal, each file shows a badge indicating what changed:
69
+ In 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:
70
+
71
+ - **created** - the file is new
72
+ - **updated** - the file already exists and was edited
73
+ - **deleted** - the file is being removed
39
74
 
40
- - **mod** - the file was modified
41
- - **del** - the file was deleted
42
- - **bin** - the file is a binary asset (image, font, etc.)
75
+ If 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.
43
76
 
44
77
  ## Auto-deploy from GitHub
45
78
 
@@ -1 +1 @@
1
- export declare const platformSelfUpdatingDocsMdxTemplate = "---\ntitle: \"Self-updating Docs\"\ndescription: \"Link documentation pages to the code they describe and let the agent rewrite them when that code changes.\"\ndate: \"2026-07-24\"\ncategory: \"Editing\"\ncategoryOrder: 1\norder: 2\nsection: \"Platform\"\n---\n# Self-updating Docs\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 the agent to write or update documentation, and read its replies |\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. Describe what you want documented, choose a **source repository** and a **scope** - the whole repo, a folder, or a single file - and the agent researches the code, plans the pages, and writes them.\n\nReplies are threaded, so a follow-up builds on what came before:\n\n> Document the auth module - cover sessions, refresh tokens and the error codes.\n\n> Now do the same for the CLI.\n\nEach turn 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\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=\"Scan for sources\">\n The **Scan for sources** button matches your existing pages against the repository by name and structure, then proposes links for you to approve. It's a good way to bootstrap a hand-written site. The scan itself uses no AI credit.\n </Step>\n <Step title=\"By hand\">\n Open a page in the editor and use the source status button in the toolbar, or the detail panel on the Map view, to say \"this page documents that file\". Hand-written pages can be tracked this way without ever having been generated.\n </Step>\n</Steps>\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\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 or monorepo setup, add the other repositories in the Source repositories manager. The agent can then be pointed at any of them, and drift is tracked across all of them.\n\n<Callout type=\"note\">\n Removing a repository that still has linked pages asks for confirmation first and tells you how many pages are affected.\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 use your project's AI credit. Doccupine keeps that spend predictable:\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 spend.\n- Only one run happens at a time per project.\n\nSee [AI Assistant](/platform/ai-assistant) for how AI is configured and budgeted.\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-07-30\"\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 the agent to write or update documentation, and read its replies |\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. Describe what you want documented, choose a **source repository** and a **scope** - the whole repo, a folder, or a single file - and the agent researches the code, plans the pages, and writes them.\n\nReplies are threaded, so a follow-up builds on what came before:\n\n> Document the auth module - cover sessions, refresh tokens and the error codes.\n\n> Now do the same for the CLI.\n\nEach turn 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\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\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 use your project's AI credit. Doccupine keeps that spend predictable:\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 spend.\n- Only one run happens at a time per project.\n\nSee [AI Assistant](/platform/ai-assistant) for how AI is configured and budgeted.\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,15 +1,16 @@
1
1
  export const platformSelfUpdatingDocsMdxTemplate = `---
2
- title: "Self-updating Docs"
3
- description: "Link documentation pages to the code they describe and let the agent rewrite them when that code changes."
2
+ title: "Agent Sync"
3
+ description: "Agent Sync links documentation pages to the code they describe and rewrites them when that code changes, keeping your docs self-updating."
4
4
  date: "2026-07-24"
5
+ updated: "2026-07-30"
5
6
  category: "Editing"
6
7
  categoryOrder: 1
7
8
  order: 2
8
9
  section: "Platform"
9
10
  ---
10
- # Self-updating Docs
11
+ # Agent Sync
11
12
 
12
- Documentation 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.
13
+ Documentation 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.
13
14
 
14
15
  You'll find it under **Agent Sync** in the project sidebar.
15
16
 
@@ -48,14 +49,38 @@ A page needs at least one source link before drift can be detected. There are th
48
49
  <Step title="Automatically, as the agent writes">
49
50
  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.
50
51
  </Step>
51
- <Step title="Scan for sources">
52
- The **Scan for sources** button matches your existing pages against the repository by name and structure, then proposes links for you to approve. It's a good way to bootstrap a hand-written site. The scan itself uses no AI credit.
52
+ <Step title="Auto-link existing pages">
53
+ **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.
53
54
  </Step>
54
55
  <Step title="By hand">
55
- Open a page in the editor and use the source status button in the toolbar, or the detail panel on the Map view, to say "this page documents that file". Hand-written pages can be tracked this way without ever having been generated.
56
+ 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.
56
57
  </Step>
57
58
  </Steps>
58
59
 
60
+ ## Auto-link existing pages
61
+
62
+ Use **Auto-link code** in the Agent Sync header when you already have documentation but it is not connected to its source code yet.
63
+
64
+ <Steps>
65
+ <Step title="Start the scan">
66
+ 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.
67
+ </Step>
68
+ <Step title="Review the suggestions">
69
+ 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.
70
+ </Step>
71
+ <Step title="Link the selected files">
72
+ 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.
73
+ </Step>
74
+ </Steps>
75
+
76
+ The 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.
77
+
78
+ <Callout type="note">
79
+ 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.
80
+ </Callout>
81
+
82
+ If 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.
83
+
59
84
  ## How drift is detected
60
85
 
61
86
  Doccupine watches your source repositories two ways:
@@ -87,10 +112,24 @@ For anything in review, **Review update** opens the change set - the same diff v
87
112
 
88
113
  Your project's own repository is always a source, so a repo that holds both code and docs needs no setup at all.
89
114
 
90
- For a multi-repo or monorepo setup, add the other repositories in the Source repositories manager. The agent can then be pointed at any of them, and drift is tracked across all of them.
115
+ For a multi-repo setup, add the other repositories from Agent Sync:
116
+
117
+ <Steps>
118
+ <Step title="Open Source repositories">
119
+ Select **Source repositories** in the Agent Sync header. Your project's repository appears first with a **Default** badge and cannot be removed.
120
+ </Step>
121
+ <Step title="Choose another repository">
122
+ 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.
123
+ </Step>
124
+ <Step title="Check its connection">
125
+ 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.
126
+ </Step>
127
+ </Steps>
128
+
129
+ Once connected, the repository appears in the Agent view's **Source repository** selector and anywhere you create a source link.
91
130
 
92
131
  <Callout type="note">
93
- Removing a repository that still has linked pages asks for confirmation first and tells you how many pages are affected.
132
+ 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.
94
133
  </Callout>
95
134
 
96
135
  ## Notifications
@@ -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### 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 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.";
@@ -130,6 +130,10 @@ When the directory name differs from the slug, use the \`directory\` field to ma
130
130
  - **slug**: The URL prefix for this section. Use an empty string \`""\` for the default section that serves at the root.
131
131
  - **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.
132
132
 
133
+ <Callout type="warning">
134
+ 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.
135
+ </Callout>
136
+
133
137
  ### Directory structure example
134
138
 
135
139
  With the explicit directory config above and a watch directory of \`docs\`, your files would look like:
@@ -0,0 +1 @@
1
+ export declare const spaceMdxTemplate = "---\ntitle: \"Space\"\ndescription: \"Add a precise vertical or horizontal gap between blocks, with per-breakpoint control.\"\ndate: \"2026-07-30\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 24\n---\n# Space\n\nInsert a fixed gap between two blocks.\n\nMarkdown already spaces paragraphs, headings, lists, and tables for you, and that default rhythm is the right choice almost everywhere. Reach for `Space` when you need a specific gap the defaults do not give you: separating a dense table from the heading that follows it, opening up a landing page, or tightening a stack of cards on small screens.\n\n<Callout type=\"note\">\n If you find yourself adding a `Space` after every section, the page is telling you it wants a different structure - try `Steps`, `Columns`, or a heading instead.\n</Callout>\n\n## Space Usage\n\nSet `$size` to the gap you want, in pixels.\n\n```html\nText above the gap.\n\n<Space $size={60} />\n\nText below the gap.\n```\n\nText above the gap.\n\n<Space $size={60} />\n\nText below the gap.\n\n## Responsive sizing\n\nA gap that looks right on a wide screen is often too large on a phone. Each breakpoint has its own prop, so you can grow the gap as the viewport widens.\n\n```html\n<Space $size={20} $md={40} $xl={80} />\n```\n\nThat renders a 20px gap by default, 40px from the `md` breakpoint up, and 80px from `xl` up.\n\nEvery breakpoint prop is a `min-width` media query, so a value applies at that width and every width above it until a larger breakpoint overrides it:\n\n| Prop | Applies from |\n| -------- | ------------ |\n| `$xs` | 0px |\n| `$sm` | 576px |\n| `$md` | 768px |\n| `$lg` | 992px |\n| `$xl` | 1200px |\n| `$xxl` | 1440px |\n| `$xxxl` | 1920px |\n\n`$size` sets the gap at every width. Use it alone for a constant gap, or as the base that the breakpoint props build on.\n\n## Removing the space at a breakpoint\n\nPass `\"none\"` instead of a number to drop the gap entirely at that width. This is the usual way to add breathing room on desktop without wasting vertical space on a phone.\n\n```html\n<Space $size=\"none\" $lg={64} />\n```\n\nHere there is no gap at all below the `lg` breakpoint, and a 64px gap from `lg` up.\n\n## Horizontal spacing\n\nAdd `$horizontal` to space things apart along the inline axis instead of the block axis. The size prop then controls width rather than height.\n\nIt belongs inside a line of inline content, where a gap along that axis has something to sit between. Dropping one into a button widens the distance between the label and the icon by the size you give it, on top of the spacing the button already applies:\n\n```html\n<Button icon=\"arrow-right\" iconPosition=\"right\">\n Get started\n <Space $size={24} $horizontal />\n</Button>\n```\n\n<Button icon=\"arrow-right\" iconPosition=\"right\">\n Get started\n <Space $size={24} $horizontal />\n</Button>\n\n## Properties\n\n<Field value=\"$size\" type=\"number | 'none'\">\n The gap at every viewport width, in pixels. Pass `\"none\"` to render nothing.\n</Field>\n\n<Field value=\"$xs\" type=\"number | 'none'\">\n Overrides the gap from 0px up.\n</Field>\n\n<Field value=\"$sm\" type=\"number | 'none'\">\n Overrides the gap from 576px up.\n</Field>\n\n<Field value=\"$md\" type=\"number | 'none'\">\n Overrides the gap from 768px up.\n</Field>\n\n<Field value=\"$lg\" type=\"number | 'none'\">\n Overrides the gap from 992px up.\n</Field>\n\n<Field value=\"$xl\" type=\"number | 'none'\">\n Overrides the gap from 1200px up.\n</Field>\n\n<Field value=\"$xxl\" type=\"number | 'none'\">\n Overrides the gap from 1440px up.\n</Field>\n\n<Field value=\"$xxxl\" type=\"number | 'none'\">\n Overrides the gap from 1920px up.\n</Field>\n\n<Field value=\"$horizontal\" type=\"boolean\">\n Spaces along the inline axis instead of the block axis, so the size props control width. Defaults to false.\n</Field>";