forked from hestiaAI/website.template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetlify.toml
71 lines (59 loc) · 2.24 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
# Netlify build configuration, integrated with Snowpack and Eleventy
# https://docs.netlify.com/configure-builds/file-based-configuration/
# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
[build]
# Directory to change to before starting a build.
# This is where we will look for package.json/.nvmrc/etc.
# If not set, defaults to the root directory.
base = "/"
# Directory that contains the deploy-ready HTML files and assets generated by
# the build. This is relative to the base directory if one has been set, or the
# root directory if a base has not been set. This sample publishes the
# directory located at the absolute path "root/project/build-output"
publish = "build/snowpack/" # linked to Snowpack `buildOptions.out` setting
# Default build command.
command = "npm run build" # triggers Eleventy and Snowpack builds in sequence
[build.environment]
NODE_VERSION = "14"
NPM_VERSION = "7"
# Overrule the language switching redirect rules coming
# hereafter, to keep access to /admin/
[[redirects]]
from = "/admin/*"
to = "/admin/:splat"
status = 302
# NOTE: uncomment following redirect, if you'd like to shadow one
# language of the website, because translations would not be ready
# NOTE: comment following redirect, when french translations will
# be ready, and remove this comment — while keeping the previous
# one, which comes from the WEBSITE.TEMPLATE
# [[redirects]]
# from = "/fr/*"
# to = "/en/:splat"
# status = 302
# force = true
# automatic language switching to fr/en,
# only enable this if we don't have a redirection en->fr is
# [[redirects]]
# from = "/"
# to = "/fr/"
# status = 302
# conditions = {Language = ["fr"]}
[[redirects]]
from = "/"
to = "/en/"
status = 302
force = true # Shadows whatever static HTML file would be deployed at root
# (see https://docs.netlify.com/routing/redirects/rewrites-proxies/#shadowing)
# This enables CORS, which allows our components
# to be used on other websites
[[headers]]
for = "/components/*"
[headers.values]
Access-Control-Allow-Origin = "*"
[[headers]]
for = "/modules/*"
[headers.values]
Access-Control-Allow-Origin = "*"
# eof