Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"organize/settings",
"organize/navigation",
"organize/pages",
"organize/hidden-pages"
"organize/hidden-pages",
"organize/mint-ignore"
]
},
{
Expand Down
48 changes: 48 additions & 0 deletions organize/mintignore.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "Mintignore"

Check warning on line 2 in organize/mintignore.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/mintignore.mdx#L2

Did you really mean 'Mintignore'?
description: "Exclude specific files and directories from your published documentation."
keywords: ["exclude", "ignore", "gitignore", "drafts", "private"]
---

The `.mintignore` file allows you to exclude specific files and directories from being processed and published to your documentation site.

Check warning on line 7 in organize/mintignore.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/mintignore.mdx#L7

In general, use active voice instead of passive voice ('being processed').

Use `.mintignore` to keep drafts, internal notes, and source files out of your public documentation while maintaining them in your repository.

## Creating a .mintignore file

Create a `.mintignore` file in the root of your docs directory. This file uses the same pattern syntax as `.gitignore`, making it familiar and easy to configure.

```plaintext .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:

- Won't appear in your published documentation
- Won't be indexed for search

Check warning on line 30 in organize/mintignore.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/mintignore.mdx#L30

In general, use active voice instead of passive voice ('be indexed').
- Won't be accessible to visitors

<Note>
Unlike [hidden pages](/organize/hidden-pages), files excluded by `.mintignore`
are completely removed from your site and cannot be accessed by URL.

Check warning on line 35 in organize/mintignore.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/mintignore.mdx#L35

Use 'can't' instead of 'cannot'.

Check warning on line 35 in organize/mintignore.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/mintignore.mdx#L35

In general, use active voice instead of passive voice ('be accessed').
</Note>

## Pattern syntax

The `.mintignore` file follows `.gitignore` syntax. Here are common patterns:

| Pattern | Description |
| ------------------ | ---------------------------------------------- |
| `drafts/` | Excludes the entire `drafts` directory |
| `*.draft.mdx` | Excludes all files ending in `.draft.mdx` |
| `private-notes.md` | Excludes a specific file |
| `**/internal/**` | Excludes any `internal` directory at any level |
| `!important.mdx` | Negates a previous pattern (includes the file) |

Check warning on line 48 in organize/mintignore.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/mintignore.mdx#L48

Use parentheses judiciously.