Skip to content

Commit

Permalink
mention Netlify ignore build setting
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Sep 3, 2021
1 parent 28d2d6a commit 3a7cb12
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions website/docs/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,25 @@ If you did not configure these build options, you may still go to "Site settings

Once properly configured with the above options, your site should deploy and automatically redeploy upon merging to your deploy branch, which defaults to `main`.

:::caution

Some Docusaurus sites put the `docs` folder outside of `website` (most likely former Docusaurus v1 sites):

```bash
repo # git root
├── docs # md files
└── website # docusaurus root
```

If you decide to use the `website` folder as Netlify's base directory, Netlify will not trigger builds when you update the `docs` folder, and you need to configure a [custom `ignore` command](https://docs.netlify.com/configure-builds/common-configurations/ignore-builds/):

```toml title="website/netlify.toml"
[build]
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../docs/"
```

:::

:::warning

By default, Netlify adds trailing slashes to Docusaurus URLs.
Expand Down

0 comments on commit 3a7cb12

Please sign in to comment.