Files
Ethan Palm db3ca0500d CLI updates (#5150)
* update skills

* update migration guide

* update API migration guide

* update assistant page

* update analytics page

* update CLI commands

* deprecate openapi-check

* add coming soon

* update docs.json

* add index page

* add install page

* add preview page

* add analytics

* add commands reference

* update links

* delete installation.mdx

* add optional prereq steps

* Add telemetry section to commands reference

Incorporates telemetry content from #5039 which was merged to main after
this branch was created. Documents opt-out flags, env variables, and
config persistence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* move global flags to top

* vale

* remove `mint upgrade`

* remove unnecessary prereq

* restructure analytics commands

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 10:40:51 -07:00

77 lines
2.4 KiB
Plaintext

---
title: "Exclude files from publishing"
sidebarTitle: "Exclude files"
description: "Exclude specific files and directories from your published documentation using a .mintignore file with glob patterns, similar to .gitignore syntax."
keywords: ["exclude", "ignore", "gitignore", "drafts", "private"]
---
The `.mintignore` file lets you exclude specific files and directories in your documentation repository from processing and publishing 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`.
```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:
- Don't appear in your published documentation.
- Aren't indexed for search.
- Aren't accessible to visitors.
- Do not trigger [broken link checks](/cli/commands#mint-broken-links). Links that point to ignored files break.
## Default ignored patterns
Mintlify automatically ignores the following directories and files without requiring any configuration:
- `.git`
- `.github`
- `.claude`
- `.agents`
- `.idea`
- `.vscode`
- `node_modules`
- `build`
- `dist`
- `coverage`
- `.cache`
- `tmp`
- `temp`
- `README.md`
- `LICENSE.md`
- `CHANGELOG.md`
- `CONTRIBUTING.md`
You don't need to add these to your `.mintignore` file.
<Note>
Unlike [hidden pages](/organize/hidden-pages), `.mintignore` completely removes
matching files from your site. Visitors cannot access them by URL.
</Note>
## Pattern syntax
The `.mintignore` file follows `.gitignore` syntax. Some common patterns include:
| 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) |