-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
netlify.toml
170 lines (148 loc) · 5.46 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# build settings for netlify
# [build] and [build.environment] are defaults, will apply to all builds unless overridden in a context stanza below
[build]
base = "site/"
# note: if you're using the netlify cli ( ie. "netlify dev" )
# this needs to be simply "public" ( otherwise it looks for "site/site/public" )
# tbd: is the global site config on netlify overriding this?
# could we switch this to be "public" always?
publish = "site/public/"
[build.environment]
# see also package.json, and docker-compose.yml
HUGO_VERSION = "0.128.2"
[context.deploy-preview]
# this command builds draft content for deploy previews
command = 'hugo -D && cp public/404/index.html public/404.html'
[context.branch-deploy]
# this command builds draft content for branches
command = 'hugo -D && cp public/404/index.html public/404.html'
[context.production]
# Note that there are two versions of the below command
# drafts are excluded (no `-D` option to hugo) for prod build. We also pull new code to the server in this case!
# comment out the next line if you are working on your own Netlify site!
command = 'hugo && cp public/404/index.html public/404.html && mkdir -p ~/.ssh && echo -e "${SSH_KEY//_/\\n}" > ~/.ssh/id_rsa && chmod og-rwx ~/.ssh/id_rsa && ssh -v -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no [email protected] "cd /opt/shift-docs && sudo ./shift pull" || (echo "you seem to be building without ssh access - see https://github.com/shift-org/shift-docs#netlify-deployment for details" ; /bin/false)'
# uncomment the next line if you are working on your own Netlify site!
# command = 'hugo && cp public/404/index.html public/404.html'
## domain redirects to serve from the CDN and canonicalize
## must be first redirects in this file!
[[redirects]]
from = "https://shift2bikes.com/*"
to = "https://www.shift2bikes.org/:splat"
status = 301
force = true
[[redirects]]
from = "https://www.shift2bikes.com/*"
to = "https://www.shift2bikes.org/:splat"
status = 301
force = true
[[redirects]]
from = "https://shifttobikes.com/*"
to = "https://www.shift2bikes.org/:splat"
status = 301
force = true
[[redirects]]
from = "https://www.shifttobikes.com/*"
to = "https://www.shift2bikes.org/:splat"
status = 301
force = true
[[redirects]]
from = "https://shifttobikes.org/*"
to = "https://www.shift2bikes.org/:splat"
status = 301
force = true
[[redirects]]
from = "https://www.shifttobikes.org/*"
to = "https://www.shift2bikes.org/:splat"
status = 301
force = true
[[redirects]]
from = "https://new.shift2bikes.org/*"
to = "https://www.shift2bikes.org/:splat"
status = 301
force = true
[[redirects]]
from = "https://pedalpalooza.org/*"
to = "http://pedalpaloozamedia.wixsite.com/pedalpalooza"
status = 302
force = true
[[redirects]]
from = "https://www.pedalpalooza.org/*"
to = "http://pedalpaloozamedia.wixsite.com/pedalpalooza"
status = 302
force = true
#------------------------------------------------------------------------------------
# dynamic back end + event images stored over here. Solves CORS problems to proxy.
#------------------------------------------------------------------------------------
[[redirects]]
from = "/api/*"
to = "https://api.shift2bikes.org/api/:splat"
status = 200
[[redirects]]
from = "/eventimages/*"
to = "https://api.shift2bikes.org/eventimages/:splat"
status = 200
# legacy ical feed for pedalpalooza. Can't get to /legacy/cal content via www.shift2bikes.org due to other redirects, so proxying secretly here.
[[redirects]]
from = "/cal/icalpp.php"
to = "https://api.shift2bikes.org/api/pedalpalooza-calendar.php"
status = 200
force = true
# the official pedalpalooza feed
[[redirects]]
from = "/cal/pedalpalooza-calendar.php"
to = "https://api.shift2bikes.org/api/pedalpalooza-calendar.php"
status = 200
force = true
# the official "all events" feed.
[[redirects]]
from = "/cal/shift-calendar.php"
to = "https://api.shift2bikes.org/api/shift-calendar.php"
status = 200
force = true
#------------------------------------------------------------------------------------
# these two are needed for legacy "shareable links" from 2017-early 2019 era
#------------------------------------------------------------------------------------
[[redirects]]
from = "/fun/*"
to = "/calendar/:splat"
status = 301
[[redirects]]
from = "/fun2/*"
to = "/calendar/:splat"
status = 301
# we can't translate REALLY legacy links (<2017) - they used some odd format.
# But let's at least land on the calendar page.
[[redirects]]
from = "/cal/*"
to = "/calendar/"
status = 301
# testing out a special redirect for a URL that someone made up
[[redirects]]
from = "/calendar/pedalpalooza"
to = "/pages/pedalpalooza"
status = 301
# remove-add trailing slashes kinda? fool can't really believe this works :P
[[redirects]]
from = "/addevent/*"
to = "/addevent"
status = 200
[[redirects]]
from = "/calendar/*"
to = "/calendar/event"
status = 200
# old pedalpalooza page should link to new one
[[redirects]]
from = "/pedalpalooza"
to = "/pages/pedalpalooza"
status = 301
# old bike rack webpage linked from PBoT and other pages we can't fix
[[redirects]]
from = "/wiki/shift-shop:rack-rental"
to = "/pages/bike-racks/"
status = 301
# redirect for BonB 20 year fundraiser 2022
[[redirects]]
from = "/fillourcups"
to = "https://shop.ohmydollar.com/collections/breakfast-on-the-bridges-20th-year-collection"
status = 200
force = true