This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathnetlify.toml
94 lines (74 loc) · 2.83 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
[settings]
# ID = "automatically set by Netlify or equal to $NETLIFY_ID_FOR_PRODUCTION when applicable"
[build]
publish = "dist/spa"
command = "yarn build"
functions = ""
# Note that headers and redirects are shared across all deploy contexts
# https://www.netlify.com/docs/netlify-toml-reference/
[[headers]]
for = "/*"
[headers.values]
# Allowing sameorigin for stelace dashboard content live-editor
X-Frame-Options = "SAMEORIGIN"
X-XSS-Protection = "1; mode=block"
# Only changing this to "all" on production branch (cf. production context below)
X-Robots-Tag = "noindex, nofollow"
# Order of redirects matters
# Serving HTML file
[[redirects]]
from = "/stelace"
to = "https://dashboard.stelace.com/"
force = true
status = 200
# All dashboard routes
[[redirects]]
from = "/stelace/*"
to = "https://dashboard.stelace.com/stelace/:splat"
force = true
status = 200
# SPA history mode routing. Keep this last:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
# For "Netlify deploy" template button
[template.environment]
STELACE_PUBLISHABLE_API_KEY = "* Stelace publishable API key (pubk_test_…)"
# Style used in demo https://api.maptiler.com/maps/STYLE_ID/style.json?key=YOUR_KEY
VUE_APP_MAPBOX_STYLE = "* Map provider style URL (we suggest Maptiler)"
# Map provider token not needed if included in style URL
# VUE_APP_MAPBOX_TOKEN = "Map token: not needed if included in style URL
VUE_APP_SERVICE_NAME = "Platform name: injected in various contents"
VUE_APP_GOOGLE_ANALYTICS_ID = "Google Analytics ID: UA-XXXXXXXX-1"
# These variables or any other ones can be set in Netlify UI later on
# VUE_APP_DEFAULT_LANGUAGE = "Language: currently en (default) or fr"
# VUE_APP_DEFAULT_CURRENCY = "Currency: ISO code like USD (default) or EUR"
# Continuous deployment
[context.production]
# Production-specific X-Robots-Tag header
command = "sed -i 's|noindex, nofollow|all|g' netlify.toml && yarn build"
[context.production.environment]
VUE_APP_SERVICE_NAME = "Stelace Heroes Demo"
# Filling these in Netlify UI rather than here
# to avoid leaking and commiting secrets to repo:
# Stelace publishable key
# STELACE_PUBLISHABLE_API_KEY
# Map
# VUE_APP_MAPBOX_STYLE
# Analytics
# VUE_APP_GOOGLE_ANALYTICS_ID
[context.dev]
# command = "yarn build"
[context.dev.environment]
VUE_APP_SERVICE_NAME = "Stelace Heroes Demo"
VUE_APP_GOOGLE_ANALYTICS_ID = "UA-XXXXXXXX-1"
VUE_APP_CDN_UPLOAD_PREFIX = "dev/cd"
# Deploy-preview context must be set explicitly.
# It is expected to be roughly the same as dev branch context
[context.deploy-preview]
# command = "yarn build"
[context.deploy-preview.environment]
VUE_APP_SERVICE_NAME = "Stelace Heroes Demo"
VUE_APP_GOOGLE_ANALYTICS_ID = "UA-XXXXXXXX-1"
VUE_APP_CDN_UPLOAD_PREFIX = "dev/cd"