From 357230d53c3336614462a0d6b686f766e8014f3a Mon Sep 17 00:00:00 2001 From: Matt Ehlinger Date: Fri, 15 Oct 2021 11:14:57 -0500 Subject: [PATCH] docs: add documentation for PATHS_PREFIX env var to enable pathPrefix (#33540) --- docs/docs/how-to/previews-deploys-hosting/path-prefix.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs/how-to/previews-deploys-hosting/path-prefix.md b/docs/docs/how-to/previews-deploys-hosting/path-prefix.md index 4acf3c0bb9534..e0598050a0509 100644 --- a/docs/docs/how-to/previews-deploys-hosting/path-prefix.md +++ b/docs/docs/how-to/previews-deploys-hosting/path-prefix.md @@ -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