Skip to main content

MDX with Frontmatter

Auto-generated frontmatter with icons, tags, SEO metadata, and keywords for every API page

Smart Navigation

Automatic docs.json generation with hierarchical namespace organization and flexible navigation modes

Context-Aware Icons

50+ FontAwesome icons automatically assigned based on type characteristics and naming patterns

Collections

Multi-project documentation with intelligent path rewriting and resource relocation

.NET Library

Programmatically create, validate, and manage Mintlify docs.json configurations in C#

Tips & Tricks

React components, external script loading, hydration fixes, and custom landing page patterns

Overview

The DotNetDocs Mintlify provider transforms your .NET XML documentation comments into production-ready Mintlify documentation sites. Built specifically for .NET developers, it generates MDX files with comprehensive frontmatter, organizes your API into intuitive navigation structures, and applies context-aware icons to make your documentation visually scannable.
The Mintlify provider is the most feature-rich renderer in DotNetDocs, with built-in support for AI discoverability, SEO optimization, and rich interactive components.

Key Features

MDX Generation with Rich Frontmatter

Every generated MDX file includes comprehensive frontmatter:
  • Title & Description: SEO-optimized 160-character descriptions for every API member
  • Icons: Context-aware FontAwesome icons based on type characteristics
  • Tags: Automatic categorization (class, interface, method, property, etc.)
  • Keywords: Extracted from XML documentation for enhanced searchability
  • Mode: Wide layout for types, standard for members
  • OpenGraph Metadata: Ready for social media sharing
---
title: PaymentProcessor
description: Processes payment transactions with support for multiple payment gateways, automatic retry logic, and comprehensive audit logging
icon: credit-card
tags: [class, public]
mode: wide
keywords: payment, transaction, gateway, processing
---

Hierarchical Navigation Generation

The Mintlify provider generates docs.json navigation files that organize your API documentation into logical hierarchies. Choose between two navigation modes:
Creates a single navigation tree with all namespaces organized hierarchically under one group.
{
  "group": "API Reference",
  "pages": [
    {
      "group": "CloudNimble.DotNetDocs",
      "pages": [
        {
          "group": "Core",
          "pages": ["api-reference/CloudNimble/DotNetDocs/Core/DocumentationManager"]
        }
      ]
    }
  ]
}

50+ Context-Aware Icons

Icons are automatically assigned based on type characteristics, member types, and naming patterns:
  • Type-based: Classes get cube, interfaces get layer-group, enums get list-ol
  • Pattern-based: Managers get gears, services get server, repositories get database
  • Member-based: Methods get function, properties get sliders, events get bolt
  • Modifier-based: Static members get s, abstract types get shapes
See the complete icon reference below for all available icons.

Flexible Output Modes

Control how namespaces are organized in the file system:
  • File Mode (Default): Each namespace gets a single MDX file with all members
  • Folder Mode: Each namespace becomes a folder with separate files per type
api-reference/
  MyNamespace.mdx
  MyNamespace.SubNamespace.mdx

DocsJson Template Customization

Customize the generated docs.json configuration by providing a template with pre-configured settings:
  • Set global appearance, colors, and theme
  • Configure integrations (Google Analytics, etc.)
  • Define custom logos and favicons
  • Pre-populate navigation structure
  • Control navigation type (Pages, Tabs, or Products)
services.AddDotNetDocsMintlify(options =>
{
    options.Template = new DocsJsonConfig
    {
        Name = "My API",
        Theme = "quill",
        NavigationType = "Tabs",           // NEW: Control root nav placement
        NavigationName = "My API Reference", // NEW: Custom name for tab/product
        Colors = new ColorsConfig
        {
            Primary = "#007ACC",
            Light = "#50A3D0",
            Dark = "#004B87"
        },
        Integrations = new IntegrationsConfig
        {
            Ga4 = new GoogleAnalytics4Config { MeasurementId = "G-XXXXXXXXXX" }
        }
    };
    options.IncludeIcons = true;
    options.GenerateDocsJson = true;
});
Set NavigationType to control whether the root project appears in main navigation (Pages), as a top-level tab (Tabs), or in the products section (Products). This is particularly useful for multi-project documentation collections.

Getting Started

1

Add the Mintlify Provider

Install the CloudNimble.DotNetDocs.Mintlify package:
dotnet add package CloudNimble.DotNetDocs.Mintlify
2

Configure Your Pipeline

Register the Mintlify renderer in your documentation pipeline:
var builder = new DotNetDocsBuilder()
    .AddDefaultPipeline()
    .AddMintlifyRenderer();

var result = await builder.BuildAsync();
3

Generate Documentation

Build your project to automatically generate Mintlify documentation:
dotnet build --configuration Release
Your MDX files and docs.json will be generated in the output directory.
4

Preview with Mintlify CLI

Install the Mintlify CLI and preview your docs locally:
npm install -g mintlify
cd docs
mintlify dev
Your documentation will be available at http://localhost:3000.

Configuration Reference

Rich Mintlify Components

The Mintlify provider generates standard MDX, allowing you to enhance generated docs with Mintlify’s rich component library. Below are examples of the most commonly used components.

Tabs & CodeGroup

Display multiple code examples or content variants. The Tabs component works with any content, while CodeGroup is specifically optimized for code blocks.
var result = await processor.ProcessAsync();

Callouts

Highlight important information with colored callout boxes:
This method is thread-safe and can be called concurrently.
This operation cannot be undone.
Use caching to improve performance.
Available since version 2.0
Best practice: Always dispose of resources

Cards & CardGroup

Create visually appealing content grids. Perfect for navigation and feature showcases.

Steps

The Steps component guides users through sequential processes with automatic numbering and visual flow.

Accordions

Accordions organize collapsible content sections for progressive disclosure. They work great for FAQs, detailed explanations, and organizing large amounts of related content.

Icon Reference

The Mintlify provider includes 50+ context-aware FontAwesome icons. Icons are automatically assigned based on type characteristics, but you can override them in XML documentation using custom tags.
Icons assigned based on type classification:
TypeIcon ClassIcon
Classfile-brackets-curly
Abstract Classshapes
Static Classbolt
Sealed Classlock
Generic Typecode-branch
Interfaceplug
Structcubes
Enumlist-ol
Recorddatabase
Delegatearrow-right-arrow-left
Assemblycubes
Namespace (populated)folder-tree
Namespace (empty)folder-open
Icons for class members:
MemberIcon ClassIcon
Methodfunction
Extension Methodpuzzle-piece
Override Methodcode-merge
Virtual Methodcode-fork
Async Methodrotate
Static Memberthumbtack
Propertytag
Fieldbox
Constant Fieldanchor
Eventbell
Constructorhammer
Operatorcalculator
Indexertable-cells
Icons assigned based on type naming patterns:
PatternIcon ClassIconExample
*ManagerbriefcaseDocumentationManager
*ServiceserverPaymentService
*ControllergamepadApiController
*FactoryindustryConnectionFactory
*BuilderhammerStringBuilder
*ProviderplugConfigurationProvider
*HandlerhandEventHandler
*Helper / *UtilitywrenchStringHelper
*Validatorcheck-circleInputValidator
*Model / *EntitydatabaseUserModel
*DTOexchangePaymentDto
*ViewModellayer-groupOrderViewModel
*Exceptiontriangle-exclamationNotFoundException
*AttributetagObsoleteAttribute
I* (interface)plugIDisposable
Icons for access modifiers and type characteristics:
ModifierIcon ClassIcon
Publicglobe
Protectedshield
Protected Internalshield-halved
Internalbuilding
Privatelock
Icons based on namespace segments:
SegmentIcon ClassIconExample
CorecircleMyApp.Core
Extensionspuzzle-pieceMyApp.Extensions
ModelsdatabaseMyApp.Models
ServicesserverMyApp.Services
DatadatabaseMyApp.Data
ControllersgamepadMyApp.Controllers
ViewseyeMyApp.Views
ViewModelslayer-groupMyApp.ViewModels
ConfigurationgearsMyApp.Configuration
HandlershandMyApp.Handlers
FactoriesindustryMyApp.Factories
BuildershammerMyApp.Builders
Validatorscheck-circleMyApp.Validators
Exceptionstriangle-exclamationMyApp.Exceptions
EntitiescubesMyApp.Entities
Enumslist-olMyApp.Enums
ConstantsanchorMyApp.Constants
TestsflaskMyApp.Tests
Shared / Commonshare-nodesMyApp.Shared
Utilities / HelperswrenchMyApp.Utilities
InterfacesplugMyApp.Interfaces
ApiplugMyApp.Api
WebglobeMyApp.Web
InfrastructurebuildingMyApp.Infrastructure

Output Structure

The Mintlify provider generates the following file structure:
docs/
├── docs.json
├── api-reference/
│   ├── MyProject/
│   │   ├── Core.mdx
│   │   ├── Core/Services.mdx
│   │   ├── Extensions.mdx
│   │   └── Models.mdx
│   └── ...
└── ...

Best Practices

Write Detailed XML Comments

The quality of your generated documentation depends on your XML comments. Include detailed <summary>, <remarks>, <example>, and <code> sections.

Use Consistent Naming

Follow .NET naming conventions. The icon system works best with standard patterns like *Manager, *Service, *Repository.

Organize Namespaces Logically

Structure your namespaces hierarchically. Use segments like Core, Extensions, Models, Services for better automatic icon selection.

Customize DocsJson Configuration

Use the Template property to provide custom docs.json configuration settings like themes, colors, and integrations.

See Also

Tips & Tricks

React components, external script loading, hydration fixes, and custom landing page patterns

Collections

Multi-project documentation with intelligent path rewriting and resource relocation

Navigation Generation

Deep dive into how Mintlify generates and merges navigation structures

.NET Library

Programmatically create, validate, and manage Mintlify docs.json configurations in C#

API Reference

Complete MintlifyRenderer API documentation

Pipeline Guide

Understand the DotNetDocs documentation pipeline

Mintlify Documentation

Official Mintlify documentation and component reference

Mintlify Schema

DocsJsonConfig schema and available settings