Skip to main content

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:
  • Unified Mode (Default)
  • ByAssembly Mode
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
services.AddDotNetDocsMintlify(options =>
{
    options.Template = new DocsJsonConfig
    {
        Name = "My API",
        Theme = "quill",
        Colors = new ColorsConfig
        {
            Primary = "#007ACC",
            Light = "#50A3D0",
            Dark = "#004B87"
        },
        Integrations = new IntegrationsConfig
        {
            Ga4 = new GoogleAnalytics4Config { MeasurementId = "G-XXXXXXXXXX" }
        }
    };
    options.IncludeIcons = true;
    options.GenerateDocsJson = true;
});

React Component Support

Mintlify MDX supports embedding custom React components directly in your documentation:
  • Import components from the snippets folder
  • Use React hooks (useState, useEffect, etc.)
  • Create interactive demos, calculators, and visualizations
  • Build reusable component libraries
snippets/ColorPicker.jsx
export const ColorPicker = () => {
  const [color, setColor] = React.useState('#3CD0E2');

  return (
    <div>
      <input
        type="color"
        value={color}
        onChange={(e) => setColor(e.target.value)}
      />
      <p>Selected: {color}</p>
    </div>
  );
};
Using the Component
import { ColorPicker } from '/snippets/ColorPicker';

## Try It Out

<ColorPicker />
React components must be placed in the snippets folder and exported as named exports. You cannot import components from arbitrary MDX files.

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.
  • C#
  • F#
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:
TypeIconSymbol
Classcube🧊
Interfacelayer-groupπŸ“š
Structcube-altπŸ”·
Enumlist-olπŸ“‹
Delegatearrow-right➑️
NamespacefolderπŸ“
Icons for class members:
MemberIconSymbol
MethodfunctionΖ’
Propertysliders🎚️
Fieldinput-textπŸ“
Eventbolt⚑
ConstructorhammerπŸ”¨
OperatorcalculatorπŸ”’
Icons assigned based on naming patterns:
PatternIconExample
*ManagergearsDocumentationManager
*ServiceserverPaymentService
*RepositorydatabaseUserRepository
*ControllergamepadApiController
*FactoryindustryConnectionFactory
*BuilderhammerStringBuilder
*ProviderplugConfigurationProvider
*HandlerhandEventHandler
*Helpercircle-questionStringHelper
*Validatorcheck-circleInputValidator
Additional icons for access modifiers and type characteristics:
ModifierIconSymbol
StaticsS
AbstractshapesπŸ”Ί
SealedlockπŸ”’
Genericbrackets-curly
Asyncarrows-spinπŸ”„
Icons based on namespace segments:
SegmentIconExample
Corecircle-dotMyApp.Core
Extensionspuzzle-pieceMyApp.Extensions
Modelsdiagram-projectMyApp.Models
ServicesserverMyApp.Services
DatadatabaseMyApp.Data
SecurityshieldMyApp.Security
WebglobeMyApp.Web
ApicloudMyApp.Api
TestingvialMyApp.Testing

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