-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnetlify.toml
More file actions
51 lines (44 loc) · 1.57 KB
/
Copy pathnetlify.toml
File metadata and controls
51 lines (44 loc) · 1.57 KB
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
[build]
# We need to run "npm install" because Netlify currently fails to cache and restore non-top-level node_modules,
# breaking the build (unless dependencies have changed).
command = "npm install && npm run build"
publish = "dist/public/"
functions = "dist/functions/"
# At the root, just load the app via index.html.
[[redirects]]
from = "/"
to = "/index.html"
status = 200
# Submission by email.
# Ideally, we would like to redirect PUT requests only, but Netlify currently doesn't support that.
# Therefore, we have set things up so that GET requests to data/libraries never happen (in contrast to a development build).
[[redirects]]
from = "/data/libraries/*"
to = "/.netlify/functions/submit"
status = 200
# GitHub authentication API: get client info.
[[redirects]]
from = "/github-auth/info"
to = "/.netlify/functions/auth-info"
status = 200
# GitHub authentication API: get access token from code.
[[redirects]]
from = "/github-auth/auth"
to = "/.netlify/functions/auth"
status = 200
# Enable preloading for the HLM library, via a separate Netlify build.
[[redirects]]
from = "/preload/libraries/hlm/*"
to = "http://slate-hlm.netlify.app/preload/:splat"
status = 200
# Serve static pages for the HLM library (which load the application if JavaScript is available).
[[redirects]]
from = "/libraries/hlm/*"
to = "http://slate-hlm.netlify.app/static/:splat"
status = 200
# Currently, documentation pages are viewed via the app.
# TODO generate static pages for these as well
[[redirects]]
from = "/docs/*"
to = "/index.html"
status = 200