doccupine 0.0.133 → 0.0.134

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 (143) hide show
  1. package/README.md +40 -1
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +274 -19
  4. package/dist/lib/config-manager.d.ts +8 -1
  5. package/dist/lib/config-manager.js +98 -4
  6. package/dist/lib/openapi-types.d.ts +120 -0
  7. package/dist/lib/openapi-types.js +14 -0
  8. package/dist/lib/openapi.d.ts +52 -0
  9. package/dist/lib/openapi.js +603 -0
  10. package/dist/lib/structures.js +28 -2
  11. package/dist/lib/types.d.ts +22 -0
  12. package/dist/lib/utils.d.ts +8 -0
  13. package/dist/lib/utils.js +14 -0
  14. package/dist/templates/app/api/playground/route.d.ts +1 -0
  15. package/dist/templates/app/api/playground/route.js +199 -0
  16. package/dist/templates/components/Docs.d.ts +1 -1
  17. package/dist/templates/components/Docs.js +11 -2
  18. package/dist/templates/components/SideBar.d.ts +1 -1
  19. package/dist/templates/components/SideBar.js +10 -0
  20. package/dist/templates/components/layout/Accordion.d.ts +1 -1
  21. package/dist/templates/components/layout/Accordion.js +3 -2
  22. package/dist/templates/components/layout/ActionBar.d.ts +1 -1
  23. package/dist/templates/components/layout/ActionBar.js +21 -14
  24. package/dist/templates/components/layout/ApiPlayground.d.ts +1 -0
  25. package/dist/templates/components/layout/ApiPlayground.js +1083 -0
  26. package/dist/templates/components/layout/ApiPlaygroundDemo.d.ts +1 -0
  27. package/dist/templates/components/layout/ApiPlaygroundDemo.js +81 -0
  28. package/dist/templates/components/layout/Code.d.ts +1 -1
  29. package/dist/templates/components/layout/Code.js +10 -22
  30. package/dist/templates/components/layout/CopyButton.d.ts +1 -0
  31. package/dist/templates/components/layout/CopyButton.js +68 -0
  32. package/dist/templates/components/layout/DocsComponents.d.ts +1 -1
  33. package/dist/templates/components/layout/DocsComponents.js +39 -0
  34. package/dist/templates/components/layout/Mermaid.d.ts +1 -1
  35. package/dist/templates/components/layout/Mermaid.js +21 -3
  36. package/dist/templates/components/layout/SharedStyles.d.ts +1 -1
  37. package/dist/templates/components/layout/SharedStyles.js +0 -4
  38. package/dist/templates/components/layout/Steps.d.ts +1 -1
  39. package/dist/templates/components/layout/Steps.js +0 -1
  40. package/dist/templates/components/layout/Update.d.ts +1 -1
  41. package/dist/templates/components/layout/Update.js +2 -1
  42. package/dist/templates/mdx/accordion.mdx.d.ts +1 -1
  43. package/dist/templates/mdx/accordion.mdx.js +19 -1
  44. package/dist/templates/mdx/ai-assistant.mdx.d.ts +1 -1
  45. package/dist/templates/mdx/ai-assistant.mdx.js +3 -2
  46. package/dist/templates/mdx/analytics.mdx.d.ts +1 -1
  47. package/dist/templates/mdx/analytics.mdx.js +2 -2
  48. package/dist/templates/mdx/api-playground.mdx.d.ts +1 -0
  49. package/dist/templates/mdx/api-playground.mdx.js +158 -0
  50. package/dist/templates/mdx/authentication.mdx.d.ts +1 -1
  51. package/dist/templates/mdx/authentication.mdx.js +3 -3
  52. package/dist/templates/mdx/buttons.mdx.d.ts +1 -1
  53. package/dist/templates/mdx/buttons.mdx.js +1 -1
  54. package/dist/templates/mdx/callouts.mdx.d.ts +1 -1
  55. package/dist/templates/mdx/callouts.mdx.js +1 -1
  56. package/dist/templates/mdx/cards.mdx.d.ts +1 -1
  57. package/dist/templates/mdx/cards.mdx.js +1 -1
  58. package/dist/templates/mdx/color-swatches.mdx.d.ts +1 -1
  59. package/dist/templates/mdx/color-swatches.mdx.js +1 -1
  60. package/dist/templates/mdx/commands.mdx.d.ts +1 -1
  61. package/dist/templates/mdx/commands.mdx.js +3 -2
  62. package/dist/templates/mdx/components.mdx.d.ts +1 -1
  63. package/dist/templates/mdx/components.mdx.js +12 -9
  64. package/dist/templates/mdx/deployment-and-hosting.mdx.d.ts +1 -1
  65. package/dist/templates/mdx/deployment-and-hosting.mdx.js +4 -3
  66. package/dist/templates/mdx/fields.mdx.d.ts +1 -1
  67. package/dist/templates/mdx/fields.mdx.js +1 -1
  68. package/dist/templates/mdx/fonts.mdx.d.ts +1 -1
  69. package/dist/templates/mdx/fonts.mdx.js +2 -2
  70. package/dist/templates/mdx/footer-links.mdx.d.ts +1 -1
  71. package/dist/templates/mdx/footer-links.mdx.js +1 -1
  72. package/dist/templates/mdx/frames.mdx.d.ts +1 -1
  73. package/dist/templates/mdx/frames.mdx.js +1 -1
  74. package/dist/templates/mdx/globals.mdx.d.ts +1 -1
  75. package/dist/templates/mdx/globals.mdx.js +1 -1
  76. package/dist/templates/mdx/icons.mdx.d.ts +1 -1
  77. package/dist/templates/mdx/icons.mdx.js +1 -1
  78. package/dist/templates/mdx/image-and-embeds.mdx.d.ts +1 -1
  79. package/dist/templates/mdx/image-and-embeds.mdx.js +1 -1
  80. package/dist/templates/mdx/media-and-assets.mdx.d.ts +1 -1
  81. package/dist/templates/mdx/media-and-assets.mdx.js +2 -2
  82. package/dist/templates/mdx/mermaid.mdx.d.ts +1 -1
  83. package/dist/templates/mdx/mermaid.mdx.js +1 -1
  84. package/dist/templates/mdx/model-context-protocol.mdx.d.ts +1 -1
  85. package/dist/templates/mdx/model-context-protocol.mdx.js +2 -2
  86. package/dist/templates/mdx/navigation.mdx.d.ts +1 -1
  87. package/dist/templates/mdx/navigation.mdx.js +22 -11
  88. package/dist/templates/mdx/platform/ai-assistant.mdx.d.ts +1 -1
  89. package/dist/templates/mdx/platform/ai-assistant.mdx.js +4 -3
  90. package/dist/templates/mdx/platform/analytics.mdx.d.ts +1 -1
  91. package/dist/templates/mdx/platform/analytics.mdx.js +2 -2
  92. package/dist/templates/mdx/platform/api-playground.mdx.d.ts +1 -0
  93. package/dist/templates/mdx/platform/api-playground.mdx.js +62 -0
  94. package/dist/templates/mdx/platform/billing.mdx.d.ts +1 -1
  95. package/dist/templates/mdx/platform/billing.mdx.js +1 -1
  96. package/dist/templates/mdx/platform/build-and-deploy.mdx.d.ts +1 -1
  97. package/dist/templates/mdx/platform/build-and-deploy.mdx.js +1 -1
  98. package/dist/templates/mdx/platform/creating-a-project.mdx.d.ts +1 -1
  99. package/dist/templates/mdx/platform/creating-a-project.mdx.js +12 -2
  100. package/dist/templates/mdx/platform/custom-domains.mdx.d.ts +1 -1
  101. package/dist/templates/mdx/platform/custom-domains.mdx.js +1 -1
  102. package/dist/templates/mdx/platform/fonts-settings.mdx.d.ts +1 -1
  103. package/dist/templates/mdx/platform/fonts-settings.mdx.js +1 -1
  104. package/dist/templates/mdx/platform/footer-links.mdx.d.ts +1 -0
  105. package/dist/templates/mdx/platform/footer-links.mdx.js +47 -0
  106. package/dist/templates/mdx/platform/import-from-github.mdx.d.ts +1 -0
  107. package/dist/templates/mdx/platform/import-from-github.mdx.js +91 -0
  108. package/dist/templates/mdx/platform/mcp.mdx.d.ts +1 -1
  109. package/dist/templates/mdx/platform/mcp.mdx.js +3 -3
  110. package/dist/templates/mdx/platform/project-settings.mdx.d.ts +1 -1
  111. package/dist/templates/mdx/platform/project-settings.mdx.js +1 -1
  112. package/dist/templates/mdx/platform/self-updating-docs.mdx.d.ts +1 -0
  113. package/dist/templates/mdx/platform/self-updating-docs.mdx.js +113 -0
  114. package/dist/templates/mdx/platform/team-members.mdx.d.ts +1 -1
  115. package/dist/templates/mdx/platform/team-members.mdx.js +1 -1
  116. package/dist/templates/mdx/sections.mdx.d.ts +1 -1
  117. package/dist/templates/mdx/sections.mdx.js +1 -1
  118. package/dist/templates/mdx/steps.mdx.d.ts +1 -1
  119. package/dist/templates/mdx/steps.mdx.js +1 -1
  120. package/dist/templates/mdx/tabs.mdx.d.ts +1 -1
  121. package/dist/templates/mdx/tabs.mdx.js +1 -1
  122. package/dist/templates/mdx/theme.mdx.d.ts +1 -1
  123. package/dist/templates/mdx/theme.mdx.js +1 -1
  124. package/dist/templates/mdx/update.mdx.d.ts +1 -1
  125. package/dist/templates/mdx/update.mdx.js +1 -1
  126. package/dist/templates/mdx/what-is-doccupine.mdx.d.ts +1 -1
  127. package/dist/templates/mdx/what-is-doccupine.mdx.js +1 -1
  128. package/dist/templates/package.js +6 -6
  129. package/dist/templates/services/openapi/playgroundAllowlistStub.d.ts +1 -0
  130. package/dist/templates/services/openapi/playgroundAllowlistStub.js +4 -0
  131. package/dist/templates/types/openapi.d.ts +1 -0
  132. package/dist/templates/types/openapi.js +93 -0
  133. package/dist/templates/utils/apiAnchors.d.ts +1 -0
  134. package/dist/templates/utils/apiAnchors.js +39 -0
  135. package/dist/templates/utils/apiSnippets.d.ts +1 -0
  136. package/dist/templates/utils/apiSnippets.js +94 -0
  137. package/dist/templates/utils/orderNavItems.d.ts +1 -1
  138. package/dist/templates/utils/orderNavItems.js +3 -0
  139. package/dist/templates/utils/playgroundAllowlist.d.ts +1 -0
  140. package/dist/templates/utils/playgroundAllowlist.js +70 -0
  141. package/dist/templates/utils/ssrfGuard.d.ts +1 -0
  142. package/dist/templates/utils/ssrfGuard.js +217 -0
  143. package/package.json +3 -2
@@ -0,0 +1,62 @@
1
+ export const platformApiPlaygroundMdxTemplate = `---
2
+ title: "API Playground"
3
+ description: "Register an OpenAPI spec and turn it into an interactive API reference with a live request playground."
4
+ date: "2026-07-26"
5
+ category: "AI & Integrations"
6
+ categoryOrder: 3
7
+ order: 2
8
+ section: "Platform"
9
+ ---
10
+ # API Playground
11
+
12
+ The API Playground settings page turns an OpenAPI spec in your repository into an interactive API reference. Any page can embed a live "try it" playground for a single endpoint, and you can generate a full reference with one page per operation.
13
+
14
+ ## Registering a spec
15
+
16
+ Open the **API Playground** settings page and choose your OpenAPI file with the **OpenAPI spec file** picker. It searches your repository for YAML and JSON files - start typing to filter, or type a path to use one that is not listed yet. The path is stored, relative to \`doccupine.json\`, as the \`openapi\` field:
17
+
18
+ \`\`\`json
19
+ {
20
+ "openapi": "openapi.yaml"
21
+ }
22
+ \`\`\`
23
+
24
+ Press **Save Configuration**, then commit the change. Both YAML and JSON specs (OpenAPI 3.0 and 3.1) are supported.
25
+
26
+ > For multiple specs, edit the \`openapi\` array in \`doccupine.json\` directly - the settings page manages a single spec.
27
+
28
+ ## Embedding a playground on a page
29
+
30
+ Add an \`openapi\` field to any page's frontmatter to render the interactive playground for that operation above the page content. The value is either \`"METHOD /path"\` or an \`operationId\`:
31
+
32
+ \`\`\`mdx
33
+ ---
34
+ title: "Create a post"
35
+ openapi: "POST /posts"
36
+ ---
37
+
38
+ Posts are created for a user. The playground above is live - fill in the fields and press **Send**.
39
+ \`\`\`
40
+
41
+ The playground resolves the operation from your configured spec, so its parameters, request body, and responses always match the source of truth.
42
+
43
+ ## Generating an API reference
44
+
45
+ Press **Generate API pages** to create one page per operation from your spec. Each generated page:
46
+
47
+ - carries an \`openapi:\` frontmatter reference, so it renders the live playground,
48
+ - is placed under an **API Reference** section, grouped by tag,
49
+ - documents every parameter, the request body, and each response,
50
+ - is staged as a pending change for you to review and commit.
51
+
52
+ Generation reads the committed spec, so save and commit your configuration first. Endpoints are shown with a colored HTTP-method badge so they are easy to scan in the file list.
53
+
54
+ ## Sending requests
55
+
56
+ Inside the playground, **Try it** opens the request editor. Fill in parameters, authentication, and the body, then press **Send**:
57
+
58
+ - **Proxy** mode runs the request from the server, so endpoints that block cross-origin browser calls still work. Requests are restricted to the servers declared in your spec.
59
+ - **Direct** mode calls the API straight from the browser.
60
+
61
+ Secrets you enter are never logged, and appear as \`<YOUR_CREDENTIALS>\` in the generated code snippets unless you choose to reveal them.
62
+ `;
@@ -1 +1 @@
1
- export declare const platformBillingMdxTemplate = "---\ntitle: \"Billing\"\ndescription: \"Manage your subscription, upgrade plans, and access the billing portal.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 4\norder: 1\nsection: \"Platform\"\n---\n# Billing\n\nDoccupine offers a free trial and two paid plans. The Billing settings page lets you manage your subscription and access the Stripe billing portal.\n\n## Free trial\n\nEvery new account starts with a **30-day free trial** - no credit card required. During the trial, you have full access to all platform features.\n\n<Callout type=\"note\">\n When your trial expires, you'll need to subscribe to a paid plan to continue using your projects. Your data is preserved - nothing is deleted when the trial ends.\n</Callout>\n\n## Plans\n\n### Pro - \\$200/month\n\n- 1 project\n- Up to 5 team members\n- All platform features\n\n### Enterprise - \\$500/month\n\n- 6 projects\n- Unlimited team members\n- All platform features\n\n## Managing your subscription\n\nClick **Manage Billing** on the Billing settings page to open the Stripe billing portal. From there you can:\n\n- Update your payment method\n- View invoices and payment history\n- Change your plan\n- Cancel your subscription\n\n## Cancellation\n\nIf you cancel your subscription, your projects enter a grace period. They are not deleted immediately, giving you time to re-subscribe if you change your mind.\n\n## Who can access billing\n\nBilling is accessible to the project **owner** and any team members with the **Billing** role.";
1
+ export declare const platformBillingMdxTemplate = "---\ntitle: \"Billing\"\ndescription: \"Manage your subscription, upgrade plans, and access the billing portal.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 5\norder: 1\nsection: \"Platform\"\n---\n# Billing\n\nDoccupine offers a free trial and two paid plans. The Billing settings page lets you manage your subscription and access the Stripe billing portal.\n\n## Free trial\n\nEvery new account starts with a **30-day free trial** - no credit card required. During the trial, you have full access to all platform features.\n\n<Callout type=\"note\">\n When your trial expires, you'll need to subscribe to a paid plan to continue using your projects. Your data is preserved - nothing is deleted when the trial ends.\n</Callout>\n\n## Plans\n\n### Pro - \\$200/month\n\n- 1 project\n- Up to 5 team members\n- All platform features\n\n### Enterprise - \\$500/month\n\n- 6 projects\n- Unlimited team members\n- All platform features\n\n## Managing your subscription\n\nClick **Manage Billing** on the Billing settings page to open the Stripe billing portal. From there you can:\n\n- Update your payment method\n- View invoices and payment history\n- Change your plan\n- Cancel your subscription\n\n## Cancellation\n\nIf you cancel your subscription, your projects enter a grace period. They are not deleted immediately, giving you time to re-subscribe if you change your mind.\n\n## Who can access billing\n\nBilling is accessible to the project **owner** and any team members with the **Billing** role.";
@@ -3,7 +3,7 @@ title: "Billing"
3
3
  description: "Manage your subscription, upgrade plans, and access the billing portal."
4
4
  date: "2026-02-19"
5
5
  category: "Account"
6
- categoryOrder: 4
6
+ categoryOrder: 5
7
7
  order: 1
8
8
  section: "Platform"
9
9
  ---
@@ -1 +1 @@
1
- export declare const platformBuildAndDeployMdxTemplate = "---\ntitle: \"Build & Deploy\"\ndescription: \"Monitor your documentation site's build status and deployment history.\"\ndate: \"2026-02-19\"\ncategory: \"Infrastructure\"\ncategoryOrder: 3\ncategoryIcon: \"server\"\norder: 1\nsection: \"Platform\"\n---\n# Build & Deploy\n\nThe Build & Deploy page shows your documentation site's build and deployment history. Every time you publish changes or push to GitHub, a new deployment is created.\n\n## Deployment status\n\nThe project header always shows your current deployment status:\n\n- **Ready** - your site is live and up to date\n- **Building** - a new deployment is in progress\n- **Queued** - a deployment is waiting to start\n- **Error** - the build failed\n\n<Callout type=\"warning\">\n If a deployment fails, check the build logs for error details. Common issues include MDX syntax errors or missing frontmatter fields.\n</Callout>\n\n## Build logs\n\nClick on any deployment to view its build logs. These show the full output of the build process, making it easy to diagnose issues.\n\n## Deployment triggers\n\nDeployments are triggered in three ways:\n\n1. **Publishing from Doccupine** - clicking Publish in the project header\n2. **Pushing to GitHub** - pushing to the `main` branch of your repository triggers an automatic deploy via webhook\n3. **Configuration changes** - saving AI assistant settings triggers a redeploy since those are stored as environment variables\n\n## Visiting your site\n\nClick the **Visit** button in the project header to open your live documentation site in a new tab.";
1
+ export declare const platformBuildAndDeployMdxTemplate = "---\ntitle: \"Build & Deploy\"\ndescription: \"Monitor your documentation site's build status and deployment history.\"\ndate: \"2026-02-19\"\ncategory: \"Infrastructure\"\ncategoryOrder: 4\ncategoryIcon: \"server\"\norder: 1\nsection: \"Platform\"\n---\n# Build & Deploy\n\nThe Build & Deploy page shows your documentation site's build and deployment history. Every time you publish changes or push to GitHub, a new deployment is created.\n\n## Deployment status\n\nThe project header always shows your current deployment status:\n\n- **Ready** - your site is live and up to date\n- **Building** - a new deployment is in progress\n- **Queued** - a deployment is waiting to start\n- **Error** - the build failed\n\n<Callout type=\"warning\">\n If a deployment fails, check the build logs for error details. Common issues include MDX syntax errors or missing frontmatter fields.\n</Callout>\n\n## Build logs\n\nClick on any deployment to view its build logs. These show the full output of the build process, making it easy to diagnose issues.\n\n## Deployment triggers\n\nDeployments are triggered in three ways:\n\n1. **Publishing from Doccupine** - clicking Publish in the project header\n2. **Pushing to GitHub** - pushing to the `main` branch of your repository triggers an automatic deploy via webhook\n3. **Configuration changes** - saving AI assistant settings triggers a redeploy since those are stored as environment variables\n\n## Visiting your site\n\nClick the **Visit** button in the project header to open your live documentation site in a new tab.";
@@ -3,7 +3,7 @@ title: "Build & Deploy"
3
3
  description: "Monitor your documentation site's build status and deployment history."
4
4
  date: "2026-02-19"
5
5
  category: "Infrastructure"
6
- categoryOrder: 3
6
+ categoryOrder: 4
7
7
  categoryIcon: "server"
8
8
  order: 1
9
9
  section: "Platform"
@@ -1 +1 @@
1
- export declare const platformCreatingAProjectMdxTemplate = "---\ntitle: \"Creating a Project\"\ndescription: \"Set up a new documentation project with a managed or user-connected GitHub repository.\"\ndate: \"2026-02-19\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\norder: 1\nsection: \"Platform\"\n---\n# Creating a Project\n\nFrom your dashboard, click **Create new project** to get started. You'll name your project and choose how its Git repository is managed.\n\n## Repository modes\n\nDoccupine needs a GitHub repository to store your documentation files. You have two options:\n\n### Managed repository\n\nChoose **Use managed repository** and Doccupine creates and manages the GitHub repo for you under its own organization. This is the simplest option - no GitHub account required on your end.\n\n### User repository\n\nChoose **Connect to GitHub** to link your own GitHub account via OAuth. Doccupine creates the repo in your account, giving you full ownership and direct access to the source files.\n\n<Callout type=\"note\">\n You can connect your GitHub account at any time. If you're not sure, start with a managed repository - you can always migrate later.\n</Callout>\n\n## What happens during setup\n\nAfter you choose a repository mode, Doccupine runs an automated setup process:\n\n1. Creates a GitHub repository\n2. Commits a starter template with example documentation files\n3. Creates a hosting project on the deployment platform\n4. Runs the initial build and deployment\n5. Sets up a webhook so future pushes to the `main` branch trigger automatic deploys\n\nThis takes about a minute. Once complete, you're redirected to your new project's file explorer.\n\n<Callout type=\"success\">\n Your site is live immediately after setup. Visit it using the **Visit** button in the project header.\n</Callout>\n\n## Project limits\n\nThe number of projects you can create depends on your plan:\n\n- **Pro** - 1 project, up to 5 team members\n- **Enterprise** - 6 projects, unlimited team members\n\nIf you've reached your limit, you'll see a prompt to upgrade your plan.";
1
+ export declare const platformCreatingAProjectMdxTemplate = "---\ntitle: \"Creating a Project\"\ndescription: \"Set up a new documentation project with a managed repository, your own GitHub account, or a repository you already have.\"\ndate: \"2026-02-19\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\norder: 1\nsection: \"Platform\"\n---\n# Creating a Project\n\nFrom your dashboard, click **Create new project** to get started. You'll name your project and choose how its Git repository is managed.\n\n## Repository modes\n\nDoccupine needs a GitHub repository to store your documentation files. You have three options:\n\n### Managed repository\n\nChoose **Use managed repository** and Doccupine creates and manages the GitHub repo for you under its own organization. This is the simplest option - no GitHub account required on your end.\n\n### User repository\n\nChoose **Connect to GitHub** to link your own GitHub account via OAuth. Doccupine creates the repo in your account, giving you full ownership and direct access to the source files.\n\n### Existing repository\n\nAlready have a Doccupine site in a repository? Choose **Connect an existing repository** to wire it up in place. Doccupine doesn't create a new repo or generate any content - it connects the one you have, sets up hosting, and installs the deploy webhook.\n\nYour repo needs a `doccupine.json` file. Its location defines the root of the documentation project, so a site living in a subfolder of a larger repository works too - Doccupine builds from that folder.\n\n<Callout type=\"note\">\n You can connect your GitHub account at any time. If you're not sure, start with a managed repository - you can always migrate later.\n</Callout>\n\n<Callout type=\"info\">\n Want the documentation written for you? [Import from GitHub](/platform/import-from-github) points the AI at any repository and generates a complete site instead of a starter one.\n</Callout>\n\n## What happens during setup\n\nAfter you choose a repository mode, Doccupine runs an automated setup process:\n\n1. Creates a GitHub repository\n2. Commits a starter template with example documentation files\n3. Creates a hosting project on the deployment platform\n4. Runs the initial build and deployment\n5. Sets up a webhook so future pushes to the `main` branch trigger automatic deploys\n\nThis takes about a minute. Once complete, you're redirected to your new project's file explorer.\n\n<Callout type=\"success\">\n Your site is live immediately after setup. Visit it using the **Visit** button in the project header.\n</Callout>\n\n## Project limits\n\nThe number of projects you can create depends on your plan:\n\n- **Pro** - 1 project, up to 5 team members\n- **Enterprise** - 6 projects, unlimited team members\n\nIf you've reached your limit, you'll see a prompt to upgrade your plan.";
@@ -1,6 +1,6 @@
1
1
  export const platformCreatingAProjectMdxTemplate = `---
2
2
  title: "Creating a Project"
3
- description: "Set up a new documentation project with a managed or user-connected GitHub repository."
3
+ description: "Set up a new documentation project with a managed repository, your own GitHub account, or a repository you already have."
4
4
  date: "2026-02-19"
5
5
  category: "Getting Started"
6
6
  categoryOrder: 0
@@ -13,7 +13,7 @@ From your dashboard, click **Create new project** to get started. You'll name yo
13
13
 
14
14
  ## Repository modes
15
15
 
16
- Doccupine needs a GitHub repository to store your documentation files. You have two options:
16
+ Doccupine needs a GitHub repository to store your documentation files. You have three options:
17
17
 
18
18
  ### Managed repository
19
19
 
@@ -23,10 +23,20 @@ Choose **Use managed repository** and Doccupine creates and manages the GitHub r
23
23
 
24
24
  Choose **Connect to GitHub** to link your own GitHub account via OAuth. Doccupine creates the repo in your account, giving you full ownership and direct access to the source files.
25
25
 
26
+ ### Existing repository
27
+
28
+ Already have a Doccupine site in a repository? Choose **Connect an existing repository** to wire it up in place. Doccupine doesn't create a new repo or generate any content - it connects the one you have, sets up hosting, and installs the deploy webhook.
29
+
30
+ Your repo needs a \`doccupine.json\` file. Its location defines the root of the documentation project, so a site living in a subfolder of a larger repository works too - Doccupine builds from that folder.
31
+
26
32
  <Callout type="note">
27
33
  You can connect your GitHub account at any time. If you're not sure, start with a managed repository - you can always migrate later.
28
34
  </Callout>
29
35
 
36
+ <Callout type="info">
37
+ Want the documentation written for you? [Import from GitHub](/platform/import-from-github) points the AI at any repository and generates a complete site instead of a starter one.
38
+ </Callout>
39
+
30
40
  ## What happens during setup
31
41
 
32
42
  After you choose a repository mode, Doccupine runs an automated setup process:
@@ -1 +1 @@
1
- export declare const platformCustomDomainsMdxTemplate = "---\ntitle: \"Custom Domains\"\ndescription: \"Connect your own domain to your documentation site with automatic HTTPS.\"\ndate: \"2026-02-19\"\ncategory: \"Infrastructure\"\ncategoryOrder: 3\norder: 0\nsection: \"Platform\"\n---\n# Custom Domains\n\nBy default, your documentation site is available at a `.doccupine.app` subdomain. You can connect your own custom domain for a branded experience.\n\n## Adding a domain\n\n1. Navigate to your project's **Domains** page from the sidebar.\n2. Enter your custom domain (e.g., `docs.yourcompany.com`).\n3. Click **Add Domain**.\n\nDoccupine will provide DNS records that you need to configure with your domain registrar.\n\n## DNS configuration\n\nAfter adding your domain, you'll see the required DNS records. Typically this involves adding a **CNAME** record pointing to your Doccupine deployment.\n\nConfigure the records with your domain registrar (Cloudflare, Namecheap, GoDaddy, Route 53, etc.) and return to the Domains page to check verification status.\n\n<Callout type=\"note\">\n DNS changes can take up to 48 hours to propagate, though most resolve within a few minutes.\n</Callout>\n\n## Verification\n\nDoccupine periodically checks whether your DNS records are configured correctly. The Domains page shows the current verification status. Once verified, your custom domain is active and serves your documentation with automatic HTTPS.\n\n## Removing a domain\n\nClick the remove button next to your domain to disconnect it. Your site will continue to be available at its `.doccupine.app` URL.";
1
+ export declare const platformCustomDomainsMdxTemplate = "---\ntitle: \"Custom Domains\"\ndescription: \"Connect your own domain to your documentation site with automatic HTTPS.\"\ndate: \"2026-02-19\"\ncategory: \"Infrastructure\"\ncategoryOrder: 4\norder: 0\nsection: \"Platform\"\n---\n# Custom Domains\n\nBy default, your documentation site is available at a `.doccupine.app` subdomain. You can connect your own custom domain for a branded experience.\n\n## Adding a domain\n\n1. Navigate to your project's **Domains** page from the sidebar.\n2. Enter your custom domain (e.g., `docs.yourcompany.com`).\n3. Click **Add Domain**.\n\nDoccupine will provide DNS records that you need to configure with your domain registrar.\n\n## DNS configuration\n\nAfter adding your domain, you'll see the required DNS records. Typically this involves adding a **CNAME** record pointing to your Doccupine deployment.\n\nConfigure the records with your domain registrar (Cloudflare, Namecheap, GoDaddy, Route 53, etc.) and return to the Domains page to check verification status.\n\n<Callout type=\"note\">\n DNS changes can take up to 48 hours to propagate, though most resolve within a few minutes.\n</Callout>\n\n## Verification\n\nDoccupine periodically checks whether your DNS records are configured correctly. The Domains page shows the current verification status. Once verified, your custom domain is active and serves your documentation with automatic HTTPS.\n\n## Removing a domain\n\nClick the remove button next to your domain to disconnect it. Your site will continue to be available at its `.doccupine.app` URL.";
@@ -3,7 +3,7 @@ title: "Custom Domains"
3
3
  description: "Connect your own domain to your documentation site with automatic HTTPS."
4
4
  date: "2026-02-19"
5
5
  category: "Infrastructure"
6
- categoryOrder: 3
6
+ categoryOrder: 4
7
7
  order: 0
8
8
  section: "Platform"
9
9
  ---
@@ -1 +1 @@
1
- export declare const platformFontsSettingsMdxTemplate = "---\ntitle: \"Fonts Settings\"\ndescription: \"Configure custom typography with Google Fonts or local font files.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 4\nsection: \"Platform\"\n---\n# Fonts Settings\n\nThe Fonts settings page lets you customize your documentation site's typography using Google Fonts or locally uploaded font files.\n\n## Google Fonts\n\nSelect a font from the full Google Fonts library:\n\n1. Type a font name to search the library.\n2. Select the **weights** you need (e.g., 400 for regular, 700 for bold). You can select multiple weights.\n3. Choose **subsets** for language support (latin, cyrillic, greek, vietnamese, etc.).\n\n<Callout type=\"note\">\n Only include the weights and subsets you actually use. Each addition increases page load time.\n</Callout>\n\n## Local fonts\n\nUpload your own font files for complete typographic control:\n\n1. Click **Add Font Source** to add a font file entry.\n2. Upload a font file (WOFF2, WOFF, TTF, OTF, or EOT format).\n3. Set the **weight** (e.g., 400, 700) and **style** (normal or italic).\n4. Add more sources for additional weights and styles.\n\nWOFF2 is recommended for the best compression and browser support.\n\n## How it works\n\nFont settings are stored in `fonts.json` at the root of your repository. Here's an example using Google Fonts:\n\n```json\n{\n \"googleFont\": {\n \"fontName\": \"Inter\",\n \"subsets\": [\"latin\"],\n \"weight\": [\"400\", \"500\", \"600\", \"700\"]\n }\n}\n```\n\nSee the [Fonts](/fonts) page for the full configuration format, including local font support.";
1
+ export declare const platformFontsSettingsMdxTemplate = "---\ntitle: \"Fonts Settings\"\ndescription: \"Configure custom typography with Google Fonts or local font files.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 3\nsection: \"Platform\"\n---\n# Fonts Settings\n\nThe Fonts settings page lets you customize your documentation site's typography using Google Fonts or locally uploaded font files.\n\n## Google Fonts\n\nSelect a font from the full Google Fonts library:\n\n1. Type a font name to search the library.\n2. Select the **weights** you need (e.g., 400 for regular, 700 for bold). You can select multiple weights.\n3. Choose **subsets** for language support (latin, cyrillic, greek, vietnamese, etc.).\n\n<Callout type=\"note\">\n Only include the weights and subsets you actually use. Each addition increases page load time.\n</Callout>\n\n## Local fonts\n\nUpload your own font files for complete typographic control:\n\n1. Click **Add Font Source** to add a font file entry.\n2. Upload a font file (WOFF2, WOFF, TTF, OTF, or EOT format).\n3. Set the **weight** (e.g., 400, 700) and **style** (normal or italic).\n4. Add more sources for additional weights and styles.\n\nWOFF2 is recommended for the best compression and browser support.\n\n## How it works\n\nFont settings are stored in `fonts.json` at the root of your repository. Here's an example using Google Fonts:\n\n```json\n{\n \"googleFont\": {\n \"fontName\": \"Inter\",\n \"subsets\": [\"latin\"],\n \"weight\": [\"400\", \"500\", \"600\", \"700\"]\n }\n}\n```\n\nSee the [Fonts](/fonts) page for the full configuration format, including local font support.";
@@ -4,7 +4,7 @@ description: "Configure custom typography with Google Fonts or local font files.
4
4
  date: "2026-02-19"
5
5
  category: "Configuration"
6
6
  categoryOrder: 2
7
- order: 4
7
+ order: 3
8
8
  section: "Platform"
9
9
  ---
10
10
  # Fonts Settings
@@ -0,0 +1 @@
1
+ export declare const platformFooterLinksMdxTemplate = "---\ntitle: \"Footer Links\"\ndescription: \"Add quick-access link buttons to your site's footer for GitHub, Discord, and other external resources.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 4\nsection: \"Platform\"\n---\n# Footer Links\n\nThe Footer Links settings page lets you add link buttons to your documentation site's footer. These provide quick access to your project's GitHub repository, Discord server, social profiles, and other resources.\n\n## Adding a link\n\nClick **Add Link** and configure:\n\n- **Icon** (optional) - search and pick from any [Lucide](https://lucide.dev/) icon\n- **Title** - the display text for the link\n- **URL** - the target URL\n\n## Choosing an icon\n\nThe icon picker lets you search through the full [Lucide](https://lucide.dev/) icon set. Type a keyword to filter (e.g. \"git-branch\", \"mail\", \"globe\") and click to select.\n\nLeave the icon unset for a text-only link.\n\nIf you edit `links.json` directly, use Lucide icon names in kebab-case (e.g. `git-branch`, `message-circle`, `heart`).\n\n## How it works\n\nLink settings are stored in `links.json` at the root of your repository:\n\n```json\n[\n {\n \"title\": \"GitHub\",\n \"url\": \"https://github.com/your-org/your-repo\",\n \"icon\": \"git-branch\"\n },\n {\n \"title\": \"Discord\",\n \"url\": \"https://discord.gg/your-invite\",\n \"icon\": \"discord\"\n }\n]\n```";
@@ -0,0 +1,47 @@
1
+ export const platformFooterLinksMdxTemplate = `---
2
+ title: "Footer Links"
3
+ description: "Add quick-access link buttons to your site's footer for GitHub, Discord, and other external resources."
4
+ date: "2026-02-19"
5
+ category: "Configuration"
6
+ categoryOrder: 2
7
+ order: 4
8
+ section: "Platform"
9
+ ---
10
+ # Footer Links
11
+
12
+ The Footer Links settings page lets you add link buttons to your documentation site's footer. These provide quick access to your project's GitHub repository, Discord server, social profiles, and other resources.
13
+
14
+ ## Adding a link
15
+
16
+ Click **Add Link** and configure:
17
+
18
+ - **Icon** (optional) - search and pick from any [Lucide](https://lucide.dev/) icon
19
+ - **Title** - the display text for the link
20
+ - **URL** - the target URL
21
+
22
+ ## Choosing an icon
23
+
24
+ The icon picker lets you search through the full [Lucide](https://lucide.dev/) icon set. Type a keyword to filter (e.g. "git-branch", "mail", "globe") and click to select.
25
+
26
+ Leave the icon unset for a text-only link.
27
+
28
+ If you edit \`links.json\` directly, use Lucide icon names in kebab-case (e.g. \`git-branch\`, \`message-circle\`, \`heart\`).
29
+
30
+ ## How it works
31
+
32
+ Link settings are stored in \`links.json\` at the root of your repository:
33
+
34
+ \`\`\`json
35
+ [
36
+ {
37
+ "title": "GitHub",
38
+ "url": "https://github.com/your-org/your-repo",
39
+ "icon": "git-branch"
40
+ },
41
+ {
42
+ "title": "Discord",
43
+ "url": "https://discord.gg/your-invite",
44
+ "icon": "discord"
45
+ }
46
+ ]
47
+ \`\`\``;
@@ -0,0 +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>";
@@ -0,0 +1,91 @@
1
+ export const platformImportFromGithubMdxTemplate = `---
2
+ title: "Import from GitHub"
3
+ description: "Paste a GitHub repository and let Doccupine's AI write a complete documentation site from your code."
4
+ date: "2026-07-24"
5
+ category: "Getting Started"
6
+ categoryOrder: 0
7
+ order: 2
8
+ section: "Platform"
9
+ ---
10
+ # Import from GitHub
11
+
12
+ Instead 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.
13
+
14
+ Start at [doccupine.com/import](https://doccupine.com/import) and paste any GitHub repository URL.
15
+
16
+ <Callout type="note">
17
+ Any of these formats work: \`github.com/owner/repo\`, the full \`https://\` URL, or just \`owner/repo\`.
18
+ </Callout>
19
+
20
+ ## How it works
21
+
22
+ <Steps>
23
+ <Step title="Paste your repository">
24
+ 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.
25
+ </Step>
26
+ <Step title="Choose where the code lives">
27
+ 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).
28
+ </Step>
29
+ <Step title="Watch it build">
30
+ 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.
31
+ </Step>
32
+ <Step title="Open your docs">
33
+ When the run finishes you're taken straight to the new project, with the site already live.
34
+ </Step>
35
+ </Steps>
36
+
37
+ ## What each stage does
38
+
39
+ | Stage | What happens |
40
+ | --------------- | ------------------------------------------------------------------------------------------- |
41
+ | **Validate** | Confirms the repository exists and that Doccupine can read it |
42
+ | **Read repo** | Downloads and scans the source files, selecting the ones that best describe the project |
43
+ | **Plan** | Drafts the page outline - sections, titles, and ordering |
44
+ | **Write pages** | Writes each page as MDX, validating every one before it ships |
45
+ | **Publish** | Creates the repository, commits the docs, and deploys the site |
46
+
47
+ ## Private repositories
48
+
49
+ Public repositories work straight away. For a private one, connect your GitHub account first - Doccupine then reads the repo with your own credentials.
50
+
51
+ If 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.
52
+
53
+ ## Cancelling an import
54
+
55
+ While 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.
56
+
57
+ Once the run reaches the publishing stage it can no longer be cancelled - by then the repository and deployment are being created.
58
+
59
+ ## Email notifications
60
+
61
+ A 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.
62
+
63
+ ## What you get
64
+
65
+ - A **multi-page MDX site** with sections, categories, and navigation already filled in
66
+ - Pages written from your real source files, not boilerplate
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
69
+
70
+ <Callout type="success">
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.
72
+ </Callout>
73
+
74
+ ## Limits
75
+
76
+ Doccupine 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.
77
+
78
+ <Callout type="note">
79
+ 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.
80
+ </Callout>
81
+
82
+ ## After the import
83
+
84
+ <Columns cols={2}>
85
+ <Card title="Edit your pages" icon="pencil" href="/platform/file-editor">
86
+ Rewrite, restructure, and add pages in the browser-based editor.
87
+ </Card>
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.
90
+ </Card>
91
+ </Columns>`;
@@ -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: \"Configuration\"\ncategoryOrder: 2\norder: 7\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\"\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>";
@@ -2,9 +2,9 @@ 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
- category: "Configuration"
6
- categoryOrder: 2
7
- order: 7
5
+ category: "AI & Integrations"
6
+ categoryOrder: 3
7
+ order: 1
8
8
  section: "Platform"
9
9
  ---
10
10
  # MCP
@@ -1 +1 @@
1
- export declare const platformProjectSettingsMdxTemplate = "---\ntitle: \"Project Settings\"\ndescription: \"Rename or delete your documentation project.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 4\ncategoryIcon: \"user\"\norder: 2\nsection: \"Platform\"\n---\n# Project Settings\n\nThe Project settings page provides basic project management options including renaming and deletion.\n\n## Renaming a project\n\nEnter a new name for your project and click **Save**. The project name is used in the dashboard and sidebar - it does not affect your site's URL or domain.\n\n## Deleting a project\n\n<Callout type=\"warning\">\n Deleting a project is permanent and cannot be undone.\n</Callout>\n\nTo delete a project:\n\n1. Navigate to the **Project** settings page.\n2. In the **Danger Zone** section, click **Delete Project**.\n3. Type your project's name to confirm.\n4. Click **Delete**.\n\nDeletion removes:\n\n- The GitHub repository (if managed by Doccupine)\n- The hosted deployment\n- All pending changes\n- All team member associations\n- The project record\n\nIf you're using a user-connected GitHub repository, the repo in your GitHub account is preserved - only the Doccupine project and its deployment are removed.";
1
+ export declare const platformProjectSettingsMdxTemplate = "---\ntitle: \"Project Settings\"\ndescription: \"Rename or delete your documentation project.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 5\ncategoryIcon: \"user\"\norder: 2\nsection: \"Platform\"\n---\n# Project Settings\n\nThe Project settings page provides basic project management options including renaming and deletion.\n\n## Renaming a project\n\nEnter a new name for your project and click **Save**. The project name is used in the dashboard and sidebar - it does not affect your site's URL or domain.\n\n## Deleting a project\n\n<Callout type=\"warning\">\n Deleting a project is permanent and cannot be undone.\n</Callout>\n\nTo delete a project:\n\n1. Navigate to the **Project** settings page.\n2. In the **Danger Zone** section, click **Delete Project**.\n3. Type your project's name to confirm.\n4. Click **Delete**.\n\nDeletion removes:\n\n- The GitHub repository (if managed by Doccupine)\n- The hosted deployment\n- All pending changes\n- All team member associations\n- The project record\n\nIf you're using a user-connected GitHub repository, the repo in your GitHub account is preserved - only the Doccupine project and its deployment are removed.";
@@ -3,7 +3,7 @@ title: "Project Settings"
3
3
  description: "Rename or delete your documentation project."
4
4
  date: "2026-02-19"
5
5
  category: "Account"
6
- categoryOrder: 4
6
+ categoryOrder: 5
7
7
  categoryIcon: "user"
8
8
  order: 2
9
9
  section: "Platform"
@@ -0,0 +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.";
@@ -0,0 +1,113 @@
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."
4
+ date: "2026-07-24"
5
+ category: "Editing"
6
+ categoryOrder: 1
7
+ order: 2
8
+ section: "Platform"
9
+ ---
10
+ # Self-updating Docs
11
+
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
+
14
+ You'll find it under **Agent Sync** in the project sidebar.
15
+
16
+ ## The four views
17
+
18
+ | View | What it's for |
19
+ | --------- | ----------------------------------------------------------------------------- |
20
+ | **Agent** | Ask the agent to write or update documentation, and read its replies |
21
+ | **Map** | Each page beside the sources it came from, with its sync state |
22
+ | **Table** | The same information as a dense, sortable list |
23
+ | **Drift** | The queue of pages whose sources have changed |
24
+
25
+ A badge on the sidebar link counts the pages currently waiting for attention.
26
+
27
+ ## Asking the agent for docs
28
+
29
+ The **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.
30
+
31
+ Replies are threaded, so a follow-up builds on what came before:
32
+
33
+ > Document the auth module - cover sessions, refresh tokens and the error codes.
34
+
35
+ > Now do the same for the CLI.
36
+
37
+ Each 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.
38
+
39
+ <Callout type="note">
40
+ 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.
41
+ </Callout>
42
+
43
+ ## Linking pages to sources
44
+
45
+ A page needs at least one source link before drift can be detected. There are three ways to create them:
46
+
47
+ <Steps>
48
+ <Step title="Automatically, as the agent writes">
49
+ 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
+ </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.
53
+ </Step>
54
+ <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
+ </Step>
57
+ </Steps>
58
+
59
+ ## How drift is detected
60
+
61
+ Doccupine watches your source repositories two ways:
62
+
63
+ - **Push webhook** - instant, and used whenever Doccupine can install a hook on the repository. Your project's own repository always has one.
64
+ - **Background check** - every 30 minutes, for repositories you don't administer.
65
+
66
+ The Source repositories manager shows which one each repo is using, as an **Instant** or **~30 min** badge.
67
+
68
+ ## Review or publish automatically
69
+
70
+ When a linked source changes, what happens next depends on the page:
71
+
72
+ | Page setting | On drift |
73
+ | -------------------------------- | ---------------------------------------------------------------- |
74
+ | Default | Flagged for review - you trigger the update |
75
+ | **Auto-update** on | The agent rewrites the page and publishes it |
76
+ | Edited by a human | **Always** flagged for review, whatever else is set |
77
+
78
+ Each 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.
79
+
80
+ For 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.
81
+
82
+ <Callout type="warning">
83
+ 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.
84
+ </Callout>
85
+
86
+ ## Source repositories
87
+
88
+ Your project's own repository is always a source, so a repo that holds both code and docs needs no setup at all.
89
+
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.
91
+
92
+ <Callout type="note">
93
+ Removing a repository that still has linked pages asks for confirmation first and tells you how many pages are affected.
94
+ </Callout>
95
+
96
+ ## Notifications
97
+
98
+ Doccupine 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.
99
+
100
+ ## What it costs
101
+
102
+ Agent runs use your project's AI credit. Doccupine keeps that spend predictable:
103
+
104
+ - 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.
105
+ - Drift that changes no lines - a merge or a rename that leaves the tracked file's content alone - never triggers a run.
106
+ - Every run has a ceiling on pages and spend.
107
+ - Only one run happens at a time per project.
108
+
109
+ See [AI Assistant](/platform/ai-assistant) for how AI is configured and budgeted.
110
+
111
+ ## In the editor
112
+
113
+ You 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 +1 @@
1
- export declare const platformTeamMembersMdxTemplate = "---\ntitle: \"Team Members\"\ndescription: \"Invite collaborators and manage roles for your documentation project.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 4\norder: 0\nsection: \"Platform\"\n---\n# Team Members\n\nThe Members settings page lets project owners invite collaborators and manage their access levels. Team members can view, edit, or manage billing depending on their assigned role.\n\n## Inviting members\n\n1. Navigate to your project's **Members** settings.\n2. Enter the collaborator's email address.\n3. Select a role.\n4. Click **Add Member**.\n\nThe invited user will see the project under **Shared Projects** on their dashboard.\n\n## Roles\n\n### Viewer\n\nCan browse files and view the project, but cannot make edits or publish changes. Useful for stakeholders who need read access.\n\n### Editor\n\nCan edit files and publish changes. Can also modify site configuration (theme, navigation, fonts, etc.). Cannot manage team members or billing.\n\n### Billing\n\nCan access the billing management page and Stripe billing portal. Cannot edit files or site configuration.\n\n<Callout type=\"note\">\n The project **owner** has full access to everything - editing, publishing, configuration, member management, billing, and project deletion.\n</Callout>\n\n## Member limits\n\nThe number of team members depends on your plan:\n\n- **Pro** - up to 5 members\n- **Enterprise** - unlimited members\n\nThe Members page shows your current count against your plan's limit.\n\n## Removing members\n\nProject owners can remove any member by clicking the remove button next to their name. Members can also remove themselves from a project by clicking **Leave Project**.";
1
+ export declare const platformTeamMembersMdxTemplate = "---\ntitle: \"Team Members\"\ndescription: \"Invite collaborators and manage roles for your documentation project.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 5\norder: 0\nsection: \"Platform\"\n---\n# Team Members\n\nThe Members settings page lets project owners invite collaborators and manage their access levels. Team members can view, edit, or manage billing depending on their assigned role.\n\n## Inviting members\n\n1. Navigate to your project's **Members** settings.\n2. Enter the collaborator's email address.\n3. Select a role.\n4. Click **Add Member**.\n\nThe invited user will see the project under **Shared Projects** on their dashboard.\n\n## Roles\n\n### Viewer\n\nCan browse files and view the project, but cannot make edits or publish changes. Useful for stakeholders who need read access.\n\n### Editor\n\nCan edit files and publish changes. Can also modify site configuration (theme, navigation, fonts, etc.). Cannot manage team members or billing.\n\n### Billing\n\nCan access the billing management page and Stripe billing portal. Cannot edit files or site configuration.\n\n<Callout type=\"note\">\n The project **owner** has full access to everything - editing, publishing, configuration, member management, billing, and project deletion.\n</Callout>\n\n## Member limits\n\nThe number of team members depends on your plan:\n\n- **Pro** - up to 5 members\n- **Enterprise** - unlimited members\n\nThe Members page shows your current count against your plan's limit.\n\n## Removing members\n\nProject owners can remove any member by clicking the remove button next to their name. Members can also remove themselves from a project by clicking **Leave Project**.";
@@ -3,7 +3,7 @@ title: "Team Members"
3
3
  description: "Invite collaborators and manage roles for your documentation project."
4
4
  date: "2026-02-19"
5
5
  category: "Account"
6
- categoryOrder: 4
6
+ categoryOrder: 5
7
7
  order: 0
8
8
  section: "Platform"
9
9
  ---
@@ -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: 3\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### 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.";
@@ -3,7 +3,7 @@ title: "Sections"
3
3
  description: "Split your documentation into top-level sections with independent sidebars."
4
4
  date: "2026-02-19"
5
5
  category: "Configuration"
6
- categoryOrder: 3
6
+ categoryOrder: 2
7
7
  order: 3
8
8
  ---
9
9
  # Sections