forked from hestiaAI/website.template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetlify.toml
74 lines (66 loc) · 2.5 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
# 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"
# NOTE: uncomment following redirect, if you'd like to shadow one
# language of the website, because translations would not be ready
#[[redirects]]
# from = "/fr/*"
# to = "/en/:splat"
# status = 302
# force = true
# =================================================================
# Upon public launch of the website, uncomment following redirects;
# without uncommenting, the «splash landing» page (index.html) will
# be served by Netlify Edge handlers when navigating to /
# =================================================================
#
## Overrule the language switching redirect rules coming
## hereafter, to keep access to /admin/
#[[redirects]]
# from = "/admin/*"
# to = "/admin/:splat"
# status = 302
#
## Automatic language switching: redirect / ⟶ /fr/, if browser
## accepted languages contains `fr`
#[[redirects]]
# from = "/"
# to = "/fr/"
# status = 302
# conditions = {Language = ["fr"]}
#
## Default language, when no language switching redirects applied
[[redirects]]
from = "/"
to = "/en/"
status = 302
# NOTE: `force` property is required to shadow the static «splash
# landing» page (index.html), which otherwise takes precedence
force = true # 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