forked from razonyang/hugo-theme-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetlify.toml
44 lines (35 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
34
35
36
37
38
39
40
41
42
43
44
[build]
publish = "exampleSite/public"
[build.environment]
NODE_VERSION = "18.12.0"
HUGO_VERSION = "0.105.0"
HUGO_ENABLEGITINFO = "true"
GO_VERSION = "1.19.3"
[context.production]
command = "cd exampleSite && npm install && hugo --minify"
[context.production.environment]
HUGO_ENV = "production"
[context.deploy-preview]
command = "cd exampleSite && npm install && hugo --minify -b=$DEPLOY_PRIME_URL"
[[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 = "/zh-cn/*"
to = "/v1/zh-hans/:splat"
[[redirects]]
from = "/zh-tw/*"
to = "/v1/zh-hant/:splat"
[[redirects]]
from = "/:lang/*"
to = "/:lang/404.html"
status = 404
[[redirects]]
from = "/*"
to = "/en/404.html" # Replace the "en" to your default language code.
# to = "/404.html" # Use it when a monolingual site or "defaultContentLanguageInSubdir" is disabled.
status = 404