-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnetlify.toml
More file actions
137 lines (114 loc) · 4.73 KB
/
Copy pathnetlify.toml
File metadata and controls
137 lines (114 loc) · 4.73 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
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
# [[plugins]]
# package = "@netlify/plugin-csp-nonce"
# [plugins.inputs]
# reportOnly = false
# # QUESTION: Try on production?
# unsafeEval = false
# excludedPath = [
# "/"
# # "/api/*",
# # "**/*.bespoke.extension"
# ]
# [[plugins]]
# package = "netlify-plugin-csp-generator"
# [plugins.inputs]
# buildDir = "mapjs/src"
[build]
publish = "mapjs/public/" # The path to your static content folder
command = "./scripts/argmap_init_script.sh" # Command to start your dev server
edge_functions = "mapjs/netlify/edge-functions"
[build.environment]
ENV = "netlify"
# QUESTION: add?
# PATH_BIN_LOCAL = "."
# QUESTION: remove? Since env-arg-defaults has DIR_PROJECTS: ${PATH_PUBLIC}
PATH_DIR_SCRIPTS = "scripts"
PATH_BIN_GLOBAL = "/usr/bin"
# Shouldn't be used but better to have an explicit value in case it's needed
# QUESTION: Or override config/environment-argmap-defaults.yaml?
# PATH_PROFILE_LOCAL = "/opt/buildhome/.local"
# And then add this to config/environment-argmap-defaults.yaml:
# PATH_ENVIRONMENT_GLOBAL: ${PATH_PROFILE_LOCAL}
PATH_ENVIRONMENT_GLOBAL = "global"
# QUESTION: If PATH_BIN_LOCAL = "." then remove this?
PATH_FILE_YQ = "./yq"
# QUESTION: Remove this now argmap-defaults.env set?
PATH_ARGMAP_ROOT = "."
PATH_DIR_CONFIG_ARGMAP_PROCESSED = "config/processed"
# NODE_PATH = "/opt/build/cache/node_modules:./mapjs/node_modules"
# NPM_FLAGS = "--prefix /opt/build/cache/node_modules"
NODE_VERSION = "18.19.0"
NPM_VERSION = "10.2.5"
GO_VERSION = "1.20"
[context.production.environment]
MODE = "prod"
DIR_PROJECTS = "." # So debug logs not visible
[context.branch-deploy.environment]
ENV = "netlify" # TEST: Remove, since in build.environment
MODE = "dev"
DIR_PROJECTS = "./mapjs/public" # So debug logs visible
[[redirects]]
from = "/"
to = "/output/html/example1-clearly-false-white-swan-simplified"
# Can't redirect to a url parameter without blocking all other url parameters from being passed on:
# to = "/output/html/example1-clearly-false-white-swan-simplified.html?map_id=mapjson_a55601d14d"
status = 302
force = true
[[redirects]]
from = "/index.html"
to = "/output/html/example1-clearly-false-white-swan-simplified"
status = 302
force = true
[[redirects]]
from = "/schemas/*"
to = "https://mapjs-schemas.netlify.app/schemas/:splat"
status = 200 # QUESTION: Or 301 instead?
force = true
[[redirects]]
from = "/favicon*"
to = "favicons/favicon:splat"
status = 200
force = false
[[redirects]]
from = "/apple-touch-icon.png"
to = "favicons/apple-touch-icon.png"
status = 200
force = false
[[edge_functions]]
path = "/sm"
function = "set_mapjs"
[[edge_functions]]
path = "/gm"
function = "get_mapjs"
[[edge_functions]]
path = "/gmh"
function = "shared_functions"
# sample dev block in the toml
# note: each of these fields are OPTIONAL and should only be used if you need an override
[dev]
# QUESTION: Can I generate using DEV_SERVER_PORT? Best to generate netlify env variable instead of using config file - but could use pandoc template
# If you would like to set environment variables for use locally with the Netlify CLI, use context.dev instead.
# https://docs.netlify.com/configure-builds/file-based-configuration/#use-a-local-build-plugin
# https://docs.netlify.com/configure-builds/file-based-configuration/#use-the-build-command-to-substitute-environment-variable-values
port = 9002 # The port that the netlify dev will be accessible on
# TODO how do I open in odb browser by default?
# Maybe this?: https://cli.netlify.com/vscode/#add-vscode-launch-configurations
autoLaunch = false # a Boolean value that determines if Netlify Dev launches the local server address in your browser
# envFiles = [".env.development.local", ".env.local", ".env.development", ".env"] # The env files to use, ordered by priority (left - highest, right - lowest)
[[plugins]]
package = "@netlify/plugin-sitemap"
[[plugins]]
package = "netlify-plugin-cache"
[plugins.inputs]
# "/home/linuxbrew/.linuxbrew/lib/", "mapjs/node_modules/"
paths = ["/opt/buildhome/.cache", "/opt/build/repo/yq", "/opt/build/repo/config/processed/", "/home/linuxbrew/.linuxbrew/lua_modules/"]
[[context.branch-deploy.plugins]]
package = "netlify-plugin-debug-cache"
[[context.production.plugins]]
package = "@netlify/plugin-lighthouse"
[[context.production.plugins.inputs.audits]]
path = "output/html/example1-clearly-false-white-swan-simplified.html?map_id=mapjson_a55601d14d"
# [context.production.plugins.inputs.settings]
# preset = "desktop" # Optionally run Lighthouse using a desktop configuration
# optional, deploy the lighthouse report to a path under your site
# output_path = "reports/lighthouse.html"