Skip to main content
Use a .mintignore file to exclude files and directories from your Mintlify build process. This is useful for keeping your documentation clean by excluding drafts, temporary files, or other content you don’t want to publish.

Creating a .mintignore file

Create a .mintignore file in the root of your documentation repository, next to your docs.json file.
/your-project
  |- docs.json
  |- .mintignore
  |- index.mdx

Syntax

The .mintignore file follows the same syntax as .gitignore files. Each line specifies a pattern for files or directories to exclude.
.mintignore
# Exclude draft files
drafts/

# Exclude temporary files
*.tmp
temp-*.mdx

# Exclude specific files
notes.md
internal-docs.mdx

Pattern rules

  • Comments: Lines starting with # are treated as comments
  • Empty lines: Blank lines are ignored
  • Directories: End patterns with / to match directories
  • Wildcards: Use * to match any characters
  • Negation: Start patterns with ! to negate a previous ignore pattern

Default ignored files

Mintlify automatically ignores the following files and directories, even without a .mintignore file:
  • .git
  • .github
  • .claude
  • .agents
  • node_modules
You don’t need to add these to your .mintignore file.

Examples

Exclude draft content

.mintignore
# Ignore all draft files
drafts/
*-draft.mdx

Exclude work-in-progress files

.mintignore
# Ignore WIP files
wip/
*-wip.mdx
TODO.md

Exclude internal documentation

.mintignore
# Internal docs
internal/
team-notes/
*.internal.mdx

Exclude specific file types

.mintignore
# Exclude all markdown files in a specific directory
archive/*.md

# Exclude backup files
*.bak
*~

Local development

When running mint dev, changes to your .mintignore file require restarting the development server to take effect.
After modifying .mintignore, restart your local development server with mint dev to apply the changes.