-
Notifications
You must be signed in to change notification settings - Fork 214
Add new doc describing mintignore #1910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8720fa2
Add new doc for mintignore
k-finken dc9631b
revert docs.json
k-finken 64523b0
Add mintignore to docs.json
k-finken c7b5339
rename to match file name and title
ethanpalm 42bc88d
Update docs.json
ethanpalm c9198a5
copyedit
ethanpalm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| --- | ||
| title: "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. | ||
|
|
||
| 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 | ||
| - 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
|
||
| </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) | | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.