-
Notifications
You must be signed in to change notification settings - Fork 2
/
netlify.toml
188 lines (173 loc) 路 5.32 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
###############################
# PUBLISH/PUBLIC
###############################
[build]
#command = "git status --porcelain && git submodule update --init --recursive && GIT_COMMIT_SHA='git rev-parse --verify HEAD' && GIT_COMMIT_SHA_SHORT='git rev-parse --short HEAD' && hugo"
command = '''
curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v3.0.1/aqua-installer | bash
export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:${PATH}"
aqua policy allow .aqua/aqua-policy.yaml
aqua install --tags first
aqua install --tags ci
mage init hugo:buildpublic algolia
'''
publish = "public"
[build.environment]
HUGO_ENABLEGITINFO = "true"
HUGO_BASEURL = "https://www.sheldonhull.com/"
HUGO_MINIFY = "true"
HUGO_DESTINATION = "public"
YARN_VERSION = "3.2.3"
YARN_ENABLE_IMMUTABLE_INSTALLS = "false"
NODE_VERSION = "18"
NETLIFY_USE_YARN = "true"
GO_VERSION = "1.22.1" # not having this installed can cause compilation conflicts
AQUA_LOG_LEVEL = "info" # "debug"
# HUGO_VERSION
###############################
# DEPLOY PREVIEWS
###############################
[context.deploy-preview]
command = '''
curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v3.0.1/aqua-installer | bash
export PATH="$(aqua root-dir)/bin:$PATH"
aqua policy allow .aqua/aqua-policy.yaml
aqua install --tags first
aqua install --tags ci
mage init build
'''
publish = "preview"
[context.deploy-preview.environment]
HUGO_GOOGLEANALYTICS = "dev"
HUGO_BASEURL = "/"
HUGO_ENABLEGITINFO = "true"
HUGO_DESTINATION = "preview"
###############################
# BRANCH
###############################
[context.branch-deploy]
publish = "branch"
command = '''
curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v3.0.1/aqua-installer | bash
export PATH="$(aqua root-dir)/bin:$PATH"
aqua policy allow .aqua/aqua-policy.yaml
aqua install --tags first
aqua install --tags ci
mage init build
'''
[context.branch-deploy.environment]
HUGO_GOOGLEANALYTICS = "dev"
HUGO_BASEURL = "/"
HUGO_ENABLEGITINFO = "true"
HUGO_DESTINATION = "branch"
# Redirects to keep jekyll based urls that some use like:
#xmlUrl="https://www.sheldonhull.com/tags/tech/feed.xml" should still be working, since hugo generates with index.xml
[[redirects]]
from = "/feed.xml"
to = "/index.xml"
status = 200
force = true
[[redirects]]
from = "/feed"
to = "/index.xml"
status = 200
force = true
[[redirects]]
from = "/*/feed.xml"
to = "/:splat/index.xml"
status = 200
force = true
[[redirects]]
from = "/rss"
to = "/index.xml"
status = 200
force = true
[[redirects]]
from = "/blog/*"
to = "/:splat"
status = 301
force = true
[[redirects]]
from = "/microblog/*"
to = "/:splat"
status = 301
force = true
[[redirects]]
from = "/microblog/"
to = "/posts/"
status = 301
force = true
# [[plugins]]
# package = "netlify-plugin-checklinks"
#
# [plugins.inputs]
# # An array of glob patterns for pages on your site
# # Recursive traversal will start from these
# entryPoints = [
# "*.html",
# ]
#
# # Recurse through all the links and asset references on your page, starting
# # at the entrypoints
# recursive = true
#
# # Checklinks outputs TAP (https://testanything.org/tap-version-13-specification.html)
# # by default. Enabling pretty mode makes the output easier on the eyes.
# pretty = true
#
# # You can mark some check as skipped, which will block checklinks
# # from ever attempting to execute them.
# # skipPatterns is an array of strings you can match against failing reports
# skipPatterns = [
# "#search-input",
# "search-input"
# ]
#
#
# # You can mark some check as todo, which will execute the check, but allow failures.
# # todoPatterns is an array of strings you can match against failing reports
# todoPatterns = []
#
# # Report on all broken links to external pages.
# # Enabling this will make your tests more brittle, since you can't control
# # external pages.
# checkExternal = false
#
# # Enable to check references to source maps, source map sources etc.
# # Many build tools don't emit working references, so this is disabled by default
# followSourceMaps = false
#
## todo: timeout/error. revisit later on
## [[plugins]]
## package = "netlify-plugin-subfont"
##
## [plugins.inputs]
## # An array of glob patterns for pages on your site
## # Recursive traversal will start from these
## entryPoints = [
## "*.html",
## ]
##
## # Follow your links across all pages to optimize the fonts across the antire site
## recursive = true
##
## # Subfont lets you set CSS font-display value of the optimized subsets
## # See https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display
## fontDisplay = "swap"
##
## # Inline generated CSS @font-face blocks into each page
## # When set to `false` an external CSS file will be created
## inlineCss = false
##
## # Inline generated font subsets into their respective @font-face blocks
## # When set to `false` external font files will be created
## inlineFonts = false
[[plugins]]
package = "netlify-plugin-webmentions"
[plugins.inputs]
# The base url of your site (optional, default: main URL set in Netlify)
baseUrl = "https://www.sheldonhull.com"
# Path to the feed URL (optional, default: /feed.xml)
feedPath = "index.xml"
# Maximum number of feed entries to check for mentions (optional, default: 1)
limit = 5