docs: mention Netlify ignore build setting (#5486)

* mention Netlify ignore build setting

* doc backport
This commit is contained in:
Sébastien Lorber 2021-09-03 19:34:10 +02:00 committed by GitHub
parent 28d2d6a8d0
commit 4f59f0782e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 0 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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.