diff --git a/config/preview/hugo.toml b/config/preview/hugo.toml new file mode 100644 index 0000000..7dc856f --- /dev/null +++ b/config/preview/hugo.toml @@ -0,0 +1 @@ +baseURL = "https://preview--runtimeterrordev.netlify.app" \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 2f11133..b673131 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,16 +1,37 @@ [build] - command = """ - hugo --minify - npm i @torchlight-api/torchlight-cli - npx torchlight - """ publish = "public" [build.environment] HUGO_VERSION = "0.111.3" [context.production] - command = "hugo" + command = """ + hugo --minify + npm i @torchlight-api/torchlight-cli + npx torchlight + """ + +[context.preview] + command = """ + hugo --minify --environment preview + npm i @torchlight-api/torchlight-cli + npx torchlight + """ + [[headers]] + for = "/*" + [headers.values] + X-Robots-Tag = "noindex" + +[context.drafts] + command = """ + hugo --minify --environment drafts -D + npm i @torchlight-api/torchlight-cli + npx torchlight + """ + [[headers]] + for = "/*" + [headers.values] + X-Robots-Tag = "noindex" [[redirects]] from = "/*"