This is what an AI/RAG pipeline sees when it indexes this page — the same output served at https://camelmind-docs.vercel.app/api/llms/getting-started/multiple-doc-sites.Back to doc

Rendered doc

Configure Multiple Documentation Sites

Configure multiple documentation sites in a single CamelMind project with versions.yml, independent navigation files, URL prefixes, and a default navigation file.

CamelMind lets you publish multiple independent documentation sites from a single project.

Each documentation site can have its own:

  • Navigation
  • URL namespace
  • Sidebar
  • Content structure

You define each documentation site in versions.yml. For example, a project can publish:

  • Product Documentation
  • API Documentation
  • SDK Documentation
  • Internal Documentation

How to define multiple documentation sites in versions.yml

Define each documentation site as an entry in versions.yml. Each entry specifies a unique id, a display label, and the navigation file used by that documentation site.

yaml
versions:
  - id: docs
    stable: true
    label: "Documentation"
    nav: nav/docs.yml

  - id: api
    stable: true
    label: "API Reference"
    nav: nav/api.yml

Each versions.yml entry registers one documentation site. The nav field connects the site to its navigation file, which defines the site's page structure and sidebar.


Set stable: true to mark a documentation site as the recommended site. CamelMind uses this flag for UI indicators, such as a Stable badge in the version selector.

The stable field does not affect routing, URL generation, or navigation.

yaml
versions:
  - id: docs
    stable: true
    label: "Documentation"
    nav: nav/docs.yml

How versions.yml and navigation files work together

The file versions.yml defines the published documentation sites and their respective navigation files.

Each navigation file defines the pages, URLs, and sidebar structure for its documentation site.

For example:

text
versions.yml
    ā”œā”€ā”€ docs → nav/docs.yml
    ā”œā”€ā”€ api  → nav/api.yml
    └── sdk  → nav/sdk.yml

This lets each documentation site have an independent page structure and sidebar while keeping all sites in the same project.


How CamelMind generates URLs for multiple documentation sites

CamelMind generates the final URL for each documentation site from its position and id in versions.yml.

Navigation entries define page slugs without URL prefixes. For example:

yaml
slug: /getting-started/overview

The first documentation site in versions.yml is the primary documentation site and keeps its navigation slugs unchanged. Additional documentation sites receive their id as a URL prefix.

For example:

yaml
versions:
  - id: docs
    label: "Documentation"
    nav: nav/docs.yml

  - id: api
    label: "API Reference"
    nav: nav/api.yml

  - id: sdk
    label: "SDK"
    nav: nav/sdk.yml

If each navigation file contains the same slug:

yaml
slug: /getting-started/overview

CamelMind generates these final URLs:

Documentation siteFinal URL
docs (first site)/getting-started/overview
api/api/getting-started/overview
sdk/sdk/getting-started/overview

How the primary documentation site determines URL prefixes

The first documentation site listed in versions.yml is the primary documentation site.

The primary site uses its navigation slugs as-is and does not receive an id URL prefix.

For example, if the primary site's navigation contains:

yaml
slug: /getting-started/overview

the final URL is:

text
/getting-started/overview

How additional documentation sites use their id as a URL prefix

Additional documentation sites use their id as the URL prefix.

CamelMind publishes a documentation site with id: api and a navigation slug of /getting-started/overview at:

text
/api/getting-started/overview

CamelMind publishes a site with id: sdk and the same navigation slug at:

text
/sdk/getting-started/overview

You do not need to add these prefixes to the slug in the navigation file.


How each documentation site uses an independent navigation file

Each documentation site references its own navigation file in versions.yml. This lets each site organize its pages differently.

For example:

text
nav/
ā”œā”€ā”€ docs.yml
ā”œā”€ā”€ api.yml
└── sdk.yml

Each navigation file is independent:

  • Product documentation can focus on tutorials and guides.
  • API documentation can organize endpoints by resource.
  • SDK documentation can group pages by programming language.

See Configure Navigation to learn how to structure each navigation file.


How to configure a single documentation site

If your project publishes only one documentation site, define one entry in versions.yml.

yaml
versions:
  - id: docs
    label: Documentation
    nav: nav/nav.yml

CamelMind publishes the single primary documentation site without an id URL prefix for its navigation slugs.

Most projects only need a single documentation site. Add additional entries when you want to publish separate documentation collections.


How to configure the default navigation file with navFile

CamelMind uses nav/nav.yml as the default navigation file for the primary documentation site.

You can change the default navigation file in camelmind.config.ts with the navFile setting.

typescript
const config: CamelMindConfig = {
  navFile: "nav/nav.yml",
}

Common multiple documentation site configurations

Choose the documentation site structure that matches how you want to organize and publish your content.

ScenarioRecommended setup
Product documentationOne documentation site
Product documentation + API referenceTwo documentation sites
Public documentation + Internal documentationTwo documentation sites
Product, API, and SDK documentationThree documentation sites
Multi-tenant or white-label documentationOne documentation site per tenant

What the AI sees

1> For a complete documentation index, see /llms.txt. To read any public page as Markdown, append .md to the URL.
2Ā 
3CamelMind lets you publish multiple independent documentation sites from a single project.
4Ā 
5Each documentation site can have its own:
6Ā 
7- Navigation
8- URL namespace
9- Sidebar
10- Content structure
11Ā 
12You define each documentation site in `versions.yml`. For example, a project can publish:
13Ā 
14- Product Documentation
15- API Documentation
16- SDK Documentation
17- Internal Documentation
18Ā 
19## How to define multiple documentation sites in versions.yml
20Ā 
21Define each documentation site as an entry in `versions.yml`. Each entry specifies a unique `id`, a display `label`, and the navigation file used by that documentation site.
22Ā 
23```yaml
24versions:
25 - id: docs
26 stable: true
27 label: "Documentation"
28 nav: nav/docs.yml
29Ā 
30 - id: api
31 stable: true
32 label: "API Reference"
33 nav: nav/api.yml
34```
35Ā 
36Each `versions.yml` entry registers one documentation site. The `nav` field connects the site to its navigation file, which defines the site's page structure and sidebar.
37Ā 
38---
39Ā 
40## How the stable field identifies the recommended documentation site
41Ā 
42Set `stable: true` to mark a documentation site as the recommended site. CamelMind uses this flag for UI indicators, such as a **Stable** badge in the version selector.
43Ā 
44The `stable` field does not affect routing, URL generation, or navigation.
45Ā 
46```yaml
47versions:
48 - id: docs
49 stable: true
50 label: "Documentation"
51 nav: nav/docs.yml
52```
53Ā 
54---
55Ā 
56## How versions.yml and navigation files work together
57Ā 
58The file `versions.yml` defines the published documentation sites and their respective navigation files.
59Ā 
60Each navigation file defines the pages, URLs, and sidebar structure for its documentation site.
61Ā 
62For example:
63Ā 
64```text
65versions.yml
66 ā”œā”€ā”€ docs → nav/docs.yml
67 ā”œā”€ā”€ api → nav/api.yml
68 └── sdk → nav/sdk.yml
69```
70Ā 
71This lets each documentation site have an independent page structure and sidebar while keeping all sites in the same project.
72Ā 
73---
74Ā 
75## How CamelMind generates URLs for multiple documentation sites
76Ā 
77CamelMind generates the final URL for each documentation site from its position and `id` in `versions.yml`.
78Ā 
79Navigation entries define page slugs without URL prefixes. For example:
80Ā 
81```yaml
82slug: /getting-started/overview
83```
84Ā 
85The first documentation site in `versions.yml` is the primary documentation site and keeps its navigation slugs unchanged. Additional documentation sites receive their `id` as a URL prefix.
86Ā 
87For example:
88Ā 
89```yaml
90versions:
91 - id: docs
92 label: "Documentation"
93 nav: nav/docs.yml
94Ā 
95 - id: api
96 label: "API Reference"
97 nav: nav/api.yml
98Ā 
99 - id: sdk
100 label: "SDK"
101 nav: nav/sdk.yml
102```
103Ā 
104If each navigation file contains the same slug:
105Ā 
106```yaml
107slug: /getting-started/overview
108```
109Ā 
110CamelMind generates these final URLs:
111Ā 
112| Documentation site | Final URL |
113| ------------------- | ------------------------------- |
114| `docs` (first site) | `/getting-started/overview` |
115| `api` | `/api/getting-started/overview` |
116| `sdk` | `/sdk/getting-started/overview` |
117Ā 
118---
119Ā 
120## How the primary documentation site determines URL prefixes
121Ā 
122The first documentation site listed in `versions.yml` is the primary documentation site.
123Ā 
124The primary site uses its navigation slugs as-is and does not receive an `id` URL prefix.
125Ā 
126For example, if the primary site's navigation contains:
127Ā 
128```yaml
129slug: /getting-started/overview
130```
131Ā 
132the final URL is:
133Ā 
134```text
135/getting-started/overview
136```
137---
138Ā 
139## How additional documentation sites use their id as a URL prefix
140Ā 
141Additional documentation sites use their `id` as the URL prefix.
142Ā 
143CamelMind publishes a documentation site with `id: api` and a navigation slug of `/getting-started/overview` at:
144Ā 
145```text
146/api/getting-started/overview
147```
148Ā 
149CamelMind publishes a site with `id: sdk` and the same navigation slug at:
150Ā 
151```text
152/sdk/getting-started/overview
153```
154Ā 
155You do not need to add these prefixes to the `slug` in the navigation file.
156Ā 
157---
158Ā 
159## How each documentation site uses an independent navigation file
160Ā 
161Each documentation site references its own navigation file in `versions.yml`. This lets each site organize its pages differently.
162Ā 
163For example:
164Ā 
165```text
166nav/
167ā”œā”€ā”€ docs.yml
168ā”œā”€ā”€ api.yml
169└── sdk.yml
170```
171Ā 
172Each navigation file is independent:
173Ā 
174* Product documentation can focus on tutorials and guides.
175* API documentation can organize endpoints by resource.
176* SDK documentation can group pages by programming language.
177Ā 
178See [Configure Navigation](/getting-started/navigation) to learn how to structure each navigation file.
179Ā 
180---
181Ā 
182## How to configure a single documentation site
183Ā 
184If your project publishes only one documentation site, define one entry in `versions.yml`.
185Ā 
186```yaml
187versions:
188 - id: docs
189 label: Documentation
190 nav: nav/nav.yml
191```
192Ā 
193CamelMind publishes the single primary documentation site without an `id` URL prefix for its navigation slugs.
194Ā 
195Most projects only need a single documentation site. Add additional entries when you want to publish separate documentation collections.
196Ā 
197---
198Ā 
199## How to configure the default navigation file with navFile
200Ā 
201CamelMind uses `nav/nav.yml` as the default navigation file for the primary documentation site.
202Ā 
203You can change the default navigation file in `camelmind.config.ts` with the `navFile` setting.
204Ā 
205```typescript
206const config: CamelMindConfig = {
207 navFile: "nav/nav.yml",
208}
209```
210Ā 
211---
212Ā 
213## Common multiple documentation site configurations
214Ā 
215Choose the documentation site structure that matches how you want to organize and publish your content.
216Ā 
217| Scenario | Recommended setup |
218| --------------------------------------------- | --------------------------------- |
219| Product documentation | One documentation site |
220| Product documentation + API reference | Two documentation sites |
221| Public documentation + Internal documentation | Two documentation sites |
222| Product, API, and SDK documentation | Three documentation sites |
223| Multi-tenant or white-label documentation | One documentation site per tenant |

Issues (0)

No AI-friendliness issues found.