This repository has been archived by the owner on Mar 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
netlify.toml
116 lines (103 loc) · 4.49 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
# [Settings]
# ID = "Your_Site_ID"
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts.
[build]
# This is the directory to change to before starting a build.
# base = "./"
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root.
# This is the directory that you are publishing from (relative to root of your repo)
publish = "styleguide/"
# This will be your default build command
command = "yarn styleguide:build"
# This is where we will look for your lambda functions
# functions = "project/functions/"
[build.environment]
NODE_VERSION = "node"
YARN_FLAGS = "--production --frozen-lockfile --silent"
RUBY_VERSION = "2.7.1"
# RUBY_VERSION may be nescessary until removal of node-sass
# Set environment variable prompts for templates
# [template.environment]
# YOUR_ENV_KEYS_NEEDED = "Enter in the ENV key here"
# # ref https://bit.ly/2wQ1mVk
# incoming-hooks = ["Service-1"]
# Production context: All deploys from the Production branch set in your site's deploy settings will inherit these settings.
# [context.production]
# publish = "output/"
# command = "make publish"
# environment = { ACCESS_TOKEN = "super secret", NODE_ENV = "8.0.1" }
# Deploy Preview context: All Deploy Previews (https://www.netlify.com/blog/2016/07/20/introducing-deploy-previews-in-netlify/)
# will inherit these settings.
# [context.deploy-preview]
# publish = "dist/"
# Here is another way to define context specific environment variables
# [context.deploy-preview.environment]
# ACCESS_TOKEN = "not so secret"
# Branch Deploy context: All deploys that are not resulting from a Pull/Merge Request and not from the primary, linked branch will inherit these settings.
# [context.branch-deploy]
# command = "echo branch"
# [context.branch-deploy.environment]
# NODE_ENV = "development"
# Specific branch context: Deploys from this branch
# will take these settings and override their
# current ones.
# [context.staging] # 'staging' is a branch name
# command = "echo 'staging'"
# base = "staging"
# For contexts of branches with special characters, enclose the branch name with quotes
# [context."feat/branch"]
# command = "echo 'special branch'"
# base = "branch"
# A basic redirects rule
# [[redirects]]
# from = "/*"
# to = "/blog/:splat"
# The following show an example redirects rule with all the supported properties.
# [[redirects]]
# from = "/old-path"
# to = "/new-path"
# status = 301
# force = false
# query = {path = ":path"} # apply this rule for /old-path?path=example
# # NOTE: Each combination of query params will need to be defined in a separate [[redirects]] block. More here: https://www.netlify.com/docs/redirects/#query-params
# conditions = {Language = ["en"], Country = ["US"], Role = ["admin"]}
# # you can use env variables you've set in the UI or within your contexts as values
# # sign each request with the value of this env variable
# signed = "API_SIGNATURE_TOKEN"
# # NOTE: env variables are only natively supported for this signed property of headers via this mechanism!
# # You can also define custom headers within your redirects blocks
# [redirects.headers]
# X-From = "Netlify"
# X-Api-Key = "some-api-key-string"
# The following redirect is intended for use with most SPA's that handles routing internally.
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
# [[redirects]]
# from = "https://MY_APP.netlify.app/*"
# to = "https://MY_APP.domain/:splat"
# status = 200
# [[redirects]]
# from = "/api/*"
# to = "https://us-central1-netlify-intercom.cloudfunctions.net/readHeaders/:splat"
# status = 200
# force = true
# conditions = {Role = ["admin", "cms"]}
# [redirects.headers]
# X-From = "Netlify"
# X-Api-Key = "some-api-key-string"
# [[headers]]
# for = "/*" # This defines which paths this specific [[headers]] block will cover.
# [headers.values]
# X-Frame-Options = "DENY"
# X-XSS-Protection = "1; mode=block"
# Content-Security-Policy = "frame-ancestors https://www.facebook.com"
# # Multi-key header rules are expressed with multi-line strings
# Link = '''
# </assets/css/base.css>; rel=preload; as=style, \
# </assets/css/base2.css>; rel=preload; as=style, \
# </assets/css/base3.css>; rel=preload; as=style'''
# # Basic-Auth allows you to password protect your whole site but is only available
# # to paid accounts
# Basic-Auth = "someuser:somepassword anotheruser:anotherpassword"