forked from hbstack/theme
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netlify.toml
35 lines (30 loc) · 773 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
[build]
command = "npm ci && hugo --minify --gc -b $URL" # change to suite your needs.
publish = "public"
[build.environment]
NODE_VERSION = "19"
HUGO_VERSION = "0.111.3"
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"
[[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