-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
netlify.toml
42 lines (37 loc) · 1.07 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
[build]
command = """
DART_SASS_VERSION="${DART_SASS_VERSION:-1.79.5}" && \
curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && \
tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && rm dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && \
export PATH=/opt/build/repo/dart-sass:$PATH && \
npm ci && \
hugo --minify -b $URL
"""
publish = "public"
[build.environment]
NODE_VERSION = "19"
HUGO_VERSION = "0.135.0"
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