create config for preview builds

This commit is contained in:
John Bowdre 2023-11-05 19:35:14 -06:00
parent 36335c3774
commit 6209fa3748
2 changed files with 28 additions and 6 deletions

1
config/preview/hugo.toml Normal file
View file

@ -0,0 +1 @@
baseURL = "https://preview--runtimeterrordev.netlify.app"

View file

@ -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 = "/*"