Files
learnk8s.io/netlify.toml
2020-04-09 11:09:48 +08:00

33 lines
1.0 KiB
TOML

[build]
base = "."
publish = "_site"
command = "npm install && npm test && npm run fmt && npm run build"
functions = "lambda"
[context.deploy-preview]
command = "npm install && npm test && mkdir -p _site && echo -e \"\nDisallow: /\" >> _site/robots.txt && npm run fmt && npm run build"
[context.deploy-preview.environment]
NODE_ENV = "production"
PUBLISH_EVENTS = "no"
[context.production.environment]
NODE_ENV = "production"
PUBLISH_EVENTS = "yes"
[[headers]]
for = "*.js" # js files should be set this way
[headers.values]
Cache-Control = "public, max-age=31556926"
[[headers]]
for = "*.css" # css files too
[headers.values]
Cache-Control = "public, max-age=31556926"
[[headers]]
for = "*.svg" # css files too
[headers.values]
Cache-Control = "public, max-age=31556926"
[[headers]]
for = "*.png" # css files too
[headers.values]
Cache-Control = "public, max-age=31556926"
[[headers]]
for = "*.jpg" # css files too
[headers.values]
Cache-Control = "public, max-age=31556926"