-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnetlify.toml
92 lines (78 loc) · 1.92 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[build]
command = "hugo --gc --minify"
publish = "public"
[build.environment]
HUGO_VERSION = "0.142.0"
# Set base URL for deploying previews
[context.deploy-preview]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
# Set base URL for deploying branches
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
# Redirect default Netlify subdomain to primary domain
[[redirects]]
from = "https://techwerkers.netlify.com/*"
to = "https://techwerkers.nl/:splat"
status = 301
force = true
# Root domain redirect based on Accept header
# Netlify only redirects on first lang. NL is the default otherwise.
[[redirects]]
from = "/"
to = "/en/"
status = 301
force = true
conditions = {Language = "en"}
[[redirects]]
from = "/"
to = "/nl/"
status = 301
force = true
# Root Redirects for localised content types.
# Netlify splat operator cannot be used on root due to it redirecting FE assets
# Adding new content types:
# - There should be a pair of "en" and "default" (nl) for each content type
[[redirects]]
from = "/events"
to = "/en/events"
status = 301
force = true
conditions = {Language = "en"}
[[redirects]]
from = "/events"
to = "/nl/events"
status = 301
force = true
[[redirects]]
from = "/join"
to = "/en/join"
status = 301
force = true
conditions = {Language = "en"}
[[redirects]]
from = "/join"
to = "/nl/join"
status = 301
force = true
[[redirects]]
from = "/resources"
to = "/en/resources"
status = 301
force = true
conditions = {Language = "en"}
[[redirects]]
from = "/resources"
to = "/nl/resources"
status = 301
force = true
# Localised 404 redirects
# Netlify shadowing means that pages that do exist behind the * will render if they exist
# otherwise they will return the referenced 404.
[[redirects]]
from = "/en/*"
to = "/en/404.html"
status = 404
[[redirects]]
from = "/*"
to = "/nl/404.html"
status = 404