Skip to main content
When combining multiple documentation projects into a unified site, the Mintlify provider goes beyond simple file copying. It automatically restructures content, relocates shared resources, and rewrites internal paths to ensure everything works seamlessly together.

The Challenge

Documentation projects (especially Mintlify-targeted ones) are typically designed as standalone sites. They reference images, snippets, and internal pages using absolute paths like /images/logo.png or /guides/quickstart. When you combine multiple projects, these paths collide:
Without intelligent handling

How Mintlify Collections Work

The MintlifyDocReferenceHandler solves this by performing three key operations during the build process:
1

Resource Relocation

Shared resource directories (images/, snippets/) are moved to central locations with project-specific namespacing:
2

Content Path Rewriting

All absolute paths in MDX files are automatically rewritten to reference the relocated resources and prefixed pages:
3

Navigation Integration

The referenced project’s navigation is merged into the parent’s docs.json, appearing as a Tab or Product based on your configuration.

Supported Path Patterns

The handler rewrites paths in all common MDX patterns:
Paths inside fenced code blocks are not rewritten, ensuring your documentation examples remain accurate.

Output Structure

After processing, your collection has a clean, conflict-free structure:

Configuration Example

MyPlatform.docsproj

Best Practices

Use Descriptive Destination Paths

Choose short, URL-friendly names like product-1 rather than full project names. These become part of every URL in the referenced content.

Organize Shared Resources

Keep images and snippets in their respective directories. The handler specifically looks for images/ and snippets/ folders to relocate.

Test Path References

After building, verify that imports, images, and links resolve correctly. Check the browser console for 404 errors.

Keep Code Examples Accurate

Since code blocks aren’t rewritten, your documentation examples will show the original paths - which is usually what you want for copy-paste accuracy.

Comparison with Base Markdown

The Mintlify handler extends the base MarkdownDocReferenceHandler with additional patterns:

See Also

Collections Guide

Complete guide to Documentation Collections including configuration, integration types, and troubleshooting

DocumentationReference

Complete reference for the DocumentationReference tag and its properties

Navigation Generation

Learn how navigation from multiple projects is merged