-
Notifications
You must be signed in to change notification settings - Fork 31
/
netlify.toml
33 lines (33 loc) · 1.01 KB
/
netlify.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[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"