-
Notifications
You must be signed in to change notification settings - Fork 4
/
netlify.toml
44 lines (41 loc) · 1.36 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]
base = ""
publish = "build"
command = "npm run build"
environment = { NODE_VERSION = "16" }
[[redirects]]
from = "https://jimniels-blog.netlify.com/*"
to = "https://blog.jim-nielsen.com/:splat"
status = 301
force = true
# How this works:
#
# URL: /.netlify/functions/preferences | FILE: netlify/functions/preferences.js
# This sets/modifies a cookie for the client so Netlify can rewrite requests
# FILE: netlify.toml
# Contains the rewrite rules
# FILE: build/_fidelity/{low|med}
# Contains the same version of the site, but with fidelity stripped out
# of the default version of the site (which lives at `build/`)
#
# Of note: "low" and "med" are the two enumerated values used in:
# - The cookies
# e.g. `fidelity-low=active` or `fidelity-med=active`
# - The redirect rules
# e.g. a request to `/about/` with `fidelity-low=active` rewrites to
# `/_fidelity/low/about/(index.html)`
# - The build directories
# e.g. a version of the site is generated for each fidelity and stuck
# in the `/_fidelity` folder, i.e. `_fidelity/low/`
# [[redirects]]
# from = "/*"
# to = "/_fidelity/low/:splat"
# status = 200
# force = true
# conditions = { Cookie = ["fidelity-low"] }
# [[redirects]]
# from = "/*"
# to = "/_fidelity/med/:splat"
# status = 200
# force = true
# conditions = { Cookie = ["fidelity-med"] }