Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed May 29, 2019
1 parent 5893a98 commit a4a249c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/ignores.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ tags:

Add an `.eleventyignore` file to your _input directory_ (or your _project root_ {% addedin "0.7.0", "span", "minilink-inline" %}) for a new line-separated list of files (or globs) that will not be processed by Eleventy. Paths listed in your project’s `.gitignore` file are automatically ignored.

{% callout "info" %}If you do not have a <code>.gitignore</code> file in your project, the <code>node_modules</code> directory will be ignored automatically.{% endcallout %}

## Example

{% codetitle ".eleventyignore" %}
Expand All @@ -19,6 +17,12 @@ _drafts/
secretNunjucksTemplates/anotherFolder/**/*.njk
```

## `node_modules` Exemption

If you do not have a `.gitignore` file in your project, the `node_modules` directory will be ignored automatically. This makes new Eleventy projects a little easier and helps developers new to Eleventy get ramped up easier too.

{% callout "info" %}{% addedin "0.8.4" %}<strong>If <code>.gitignore</code> exists but is empty</strong>: if you have a <code>.gitignore</code> file and it is empty (or only contains white-space), <code>node_modules</code> will be ignored automatically.{% endcallout %}

## Opt-out of using `.gitignore` {% addedin "0.3.5" %}

You can disable automatic use of your `.gitignore` file by using the Configuration API method: `eleventyConfig.setUseGitIgnore(false);`.
Expand Down

0 comments on commit a4a249c

Please sign in to comment.