Skip to main content
The .mintignore file allows you to exclude specific files and directories from being processed and published to your documentation site. Use .mintignore to keep drafts, internal notes, and source files out of your public documentation while maintaining them in your repository.

Create a .mintignore file

Create a .mintignore file in the root of your docs directory. This file uses the same pattern syntax as .gitignore.
.mintignore
# Exclude draft documents
drafts/
*.draft.mdx

# Exclude internal documentation
internal/

# Exclude specific files
private-notes.md
When Mintlify builds your documentation, it reads the .mintignore file and excludes any matching files or directories from processing. Excluded files:
  • Don’t appear in your published documentation.
  • Aren’t indexed for search.
  • Aren’t accessible to visitors.
Unlike hidden pages, files excluded by .mintignore are completely removed from your site and cannot be accessed by URL.

Pattern syntax

The .mintignore file follows .gitignore syntax. Some common patterns include:
PatternDescription
drafts/Excludes the entire drafts directory
*.draft.mdxExcludes all files ending in .draft.mdx
private-notes.mdExcludes a specific file
**/internal/**Excludes any internal directory at any level
!important.mdxNegates a previous pattern (includes the file)