Documentation Collections allow you to combine multiple independent .docsproj projects into a single unified documentation portal. This feature is perfect for:
Microservices: Create a single portal for all services in your architecture
Multi-Product Suites: Unify documentation across separate open-source products
Modular Systems: Combine documentation from independently maintained modules
Collections work by copying documentation files from referenced projects and combining their navigation structures into a single cohesive experience.
Collections are currently supported for Mintlify documentation only. Support for other documentation formats may be added in future releases.
The collection .docsproj is a normal, first-class documentation project that:
Has its own assemblies to document (or none at all)
Has its own conceptual content and guides
Has its own branding and theme configuration
Generates its own documentation using the standard pipeline
After the collection completes its normal documentation generation, DotNetDocs:
Copies markdown files from referenced projects into the collection’s folder structure
Loads each referenced project’s docs.json navigation file
Applies URL prefixes to navigation paths
Combines navigation into the collection’s Tabs or Products arrays
Saves the final docs.json once with everything integrated
No complex merging logic or priorities neededjust copy files and combine navigation. This “Easy As Fuck”” design keeps collections simple and predictable.
If you try to reference a project with a different DocumentationType, you’ll see a warning:
Copy
Ask AI
� Skipping documentation reference 'ServiceA.docsproj' because it uses 'DocFX' format.Only 'Mintlify' documentation can be combined with Mintlify collections.Cross-format documentation combination is not currently supported.
The reference will be skipped, but the build continues successfully.
Build the referenced projects before building the collection. The collection copies existing documentation outputsit doesn’t build referenced projects automatically.
Problem: The .docsproj path is incorrect or the file doesn’t exist.Solution: Verify the path in your DocumentationReference is correct. Use relative paths from the collection .docsproj location.
Problem: The referenced project hasn’t been built yet, so its documentation outputs don’t exist.Solution: Build referenced projects before building the collection:
“Skipping documentation reference… uses different format”
Problem: The referenced project uses a different DocumentationType than the collection.Solution: Ensure all referenced projects use the same documentation type. Collections can only combine documentation of the same format (currently Mintlify only).
<CardGroup cols={2}> <Card title="Build Order Matters" icon="arrows-turn-right"> Always build referenced projects before building the collection. Use solution build order or explicit build scripts. </Card> <Card title="Use Consistent Paths" icon="folder-tree"> Organize `DestinationPath` consistently (e.g., all services under `services/`, all plugins under `plugins/`). </Card> <Card title="Keep References Simple" icon="minimize"> Avoid circular references or overly complex reference chains. Keep your dependency graph flat and straightforward. </Card> <Card title="Version Together" icon="code-branch"> When releasing, ensure referenced projects and collections use compatible versions of DotNetDocs.Sdk. </Card> <Card title="Test Independently" icon="vial"> Each referenced project should work standalone before being added to a collection. Test them independently first. </Card> <Card title="Document the Collection" icon="book"> Add a `README.md` or introduction page explaining the collection structure and how projects relate to each other. </Card></CardGroup>
Mintlify Only: Collections currently only work with Mintlify documentation. Support for DocFX, MkDocs, etc. may be added later.
No Cross-Format: You cannot combine Mintlify and DocFX documentation in the same collection. All references must use the same format.
Build-Time Only: Collections are resolved at build time. You cannot dynamically add references at runtime.
No Transitive References: If ProjectA references ProjectB, and you reference ProjectA in your collection, you don’t automatically get ProjectB. Each reference must be explicit.
Single SDK Version: All referenced projects should use the same (or compatible) versions of DotNetDocs.Sdk to ensure consistent behavior.
For those interested in how collections work under the hood:
Copy
Ask AI
<AccordionGroup> <Accordion title="MSBuild Integration" icon="gear"> The `DocumentationReferenceResolverTask` runs during build to: 1. Load each referenced `.docsproj` file 2. Extract `DocumentationRoot` and `DocumentationType` properties 3. Validate that documentation outputs exist 4. Populate `ResolvedDocumentationReference` items with metadata These resolved items are passed to `GenerateDocumentationTask`, which populates `ProjectContext.DocumentationReferences`. </Accordion> <Accordion title="File Copying" icon="copy"> The `DocumentationManager.CopyReferencedDocumentationAsync()` method: 1. Iterates through each `DocumentationReference` 2. Determines file patterns based on `DocumentationType` 3. Copies files from `DocumentationRoot` to `DestinationPath` 4. Skips files that already exist in the collection (collection wins) Copying happens **after** rendering completes. </Accordion> <Accordion title="Navigation Combining" icon="diagram-project"> The `MintlifyRenderer.CombineReferencedNavigation()` method: 1. Loads each reference's `docs.json` using `DocsJsonManager` 2. Applies URL prefix using `ApplyUrlPrefix(DestinationPath)` 3. Adds navigation to `Tabs` or `Products` array based on `IntegrationType` 4. Saves the combined `docs.json` once at the end This happens **inside** `RenderAsync()` before saving, not as a separate step. </Accordion> <Accordion title="URL Prefix Application" icon="link"> The `DocsJsonManager.ApplyUrlPrefix()` method recursively processes: - **String pages**: Prepends the prefix - **GroupConfig.Pages**: Recursively processes nested pages - **TabConfig.Pages**: Recursively processes nested pages - **DropdownConfig.Pages**: Recursively processes nested pages This ensures URL prefixes are applied at **all** nesting levels for correct navigation. </Accordion></AccordionGroup>
<CardGroup cols={2}> <Card title=".docsproj Reference" icon="gear-complex-code" href="/guides/docsproj"> Learn about all available MSBuild properties for documentation projects </Card> <Card title="Deployment" icon="conveyor-belt-boxes" href="/guides/deployment"> Deploy your collection to Mintlify, GitHub Pages, or other hosting platforms </Card> <Card title="Pipeline Overview" icon="faucet-drip" href="/guides/pipeline"> Understand how the documentation pipeline processes assemblies and content </Card> <Card title="Mintlify Provider" icon="sparkles" href="/providers/mintlify"> Deep dive into Mintlify-specific features and configuration </Card></CardGroup>