Skip to content

Commit 357230d

Browse files
authored
docs: add documentation for PATHS_PREFIX env var to enable pathPrefix (#33540)
1 parent 83396a5 commit 357230d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/docs/how-to/previews-deploys-hosting/path-prefix.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ module.exports = {
2828

2929
## Build
3030

31-
The final step is to build your application with the `--prefix-paths` flag, like so:
31+
The final step is to build your application with either the `--prefix-paths` flag or `PREFIX_PATHS` environment variable, like so:
3232

3333
```shell
3434
gatsby build --prefix-paths
3535
```
3636

37+
```shell
38+
PREFIX_PATHS=true gatsby build
39+
```
40+
3741
If this flag is not passed, Gatsby will ignore your `pathPrefix` and build the site as if hosted from the root domain.
3842

3943
## Serve

0 commit comments

Comments
 (0)