Skip to content

Commit

Permalink
docs: add documentation for PATHS_PREFIX env var to enable pathPrefix (
Browse files Browse the repository at this point in the history
  • Loading branch information
veryspry authored Oct 15, 2021
1 parent 83396a5 commit 357230d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/docs/how-to/previews-deploys-hosting/path-prefix.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ module.exports = {

## Build

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

```shell
gatsby build --prefix-paths
```

```shell
PREFIX_PATHS=true gatsby build
```

If this flag is not passed, Gatsby will ignore your `pathPrefix` and build the site as if hosted from the root domain.

## Serve
Expand Down

0 comments on commit 357230d

Please sign in to comment.