forked from hugomods/site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetlify.toml
36 lines (31 loc) · 820 Bytes
/
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
34
35
36
[build]
command = "cd main && npm ci && hugo --minify --gc -b $URL"
publish = "main/public/en"
[build.environment]
NODE_VERSION = "19"
HUGO_VERSION = "0.121.2"
HUGO_ENABLEGITINFO = "true"
HUGO_ENV = "production"
GO_VERSION = "1.20"
[[headers]]
for = "/*"
[headers.values]
Referrer-Policy = "strict-origin-when-cross-origin"
X-Content-Type-Options = "nosniff"
X-Frame-Options = "deny"
X-XSS-Protection = "1; mode=block"
# multilingual 404 pages, remove it on monolingual sites.
[[redirects]]
from = "/en/*"
to = "/en/404.html"
status = 404
[[redirects]]
from = "/zh-hans/*"
to = "/zh-hans/404.html"
status = 404
# fallback 404 page.
[[redirects]]
from = "/*"
to = "/404.html"
# to = "/en/404.html" # use this instead if defaultContentLanguageInSubdir is enabled.
status = 404