Skip to main content
Use .mintignore to exclude specific files and folders from your documentation build. This file works exactly like .gitignore, allowing you to define patterns for content that should not be processed or deployed.

Creating a .mintignore file

Create a .mintignore file in the root of your documentation directory. The file uses the same syntax and pattern matching as .gitignore.
.mintignore
# Ignore draft content
drafts/

# Ignore temporary files
*.tmp
*.bak

# Ignore specific files
internal-notes.mdx
team-only.mdx

# Ignore all files in a directory except one
secret/*
!secret/public-info.mdx

Pattern syntax

.mintignore supports standard gitignore pattern matching:
  • * matches any string of characters except /
  • ** matches any string of characters including /
  • ? matches any single character except /
  • [abc] matches any character inside the brackets
  • Lines starting with # are comments
  • Lines starting with ! negate previous patterns

Common use cases

Ignore draft content

Exclude work-in-progress documentation from your build:
drafts/
wip/
*.draft.mdx

Ignore internal documentation

Keep internal notes and team-specific content out of your public docs:
internal/
team-notes/
*-internal.mdx

Ignore temporary files

Exclude backup files and editor artifacts:
*.tmp
*.bak
*.swp
*~
.DS_Store

Ignore test files

Exclude test content used during development:
test/
*.test.mdx
examples/sandbox/

How it works

When you build your documentation, Mintlify reads the .mintignore file and excludes any matching files and folders from processing. Ignored files:
  • Are not processed during the build
  • Do not appear in your deployed documentation
  • Are not indexed for search
  • Are not available to the AI assistant
Files excluded by .mintignore are completely removed from the build. If you want to keep files accessible by URL but hidden from navigation, use hidden pages instead.

Differences from hidden pages

.mintignore and hidden pages serve different purposes:
Feature.mintignoreHidden pages
Included in buildNoYes
Accessible by URLNoYes
Indexed for searchNoOptional
Available to AI assistantNoOptional
Use caseExclude from deploymentHide from navigation

Examples

Basic example

.mintignore
# Ignore all draft content
drafts/

# Ignore specific files
internal-roadmap.mdx
team-meeting-notes.mdx

Advanced example

.mintignore
# Ignore all markdown files in the temp directory
temp/**/*.mdx

# Ignore all files starting with underscore
_*

# But don't ignore _meta.json files
!_meta.json

# Ignore backup files
*.bak
*.tmp

# Ignore OS files
.DS_Store
Thumbs.db

# Ignore editor files
*.swp
*.swo
*~

Monorepo example

For monorepo setups, place .mintignore in your documentation directory:
/your-monorepo
  |- packages/
  |- apps/
  |- docs/
    |- .mintignore
    |- docs.json
    |- index.mdx
The patterns in .mintignore are relative to the documentation directory, not the repository root.