Skip to content

Commit

Permalink
Update Netlify configuration (#824)
Browse files Browse the repository at this point in the history
- CSS and JS path are incorrect
- `NETLIFY_IMAGES_CDN_DOMAIN` doesn't appear to exist anymore and isn't documented (https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables)
- Netlify removed all post processing besides `pretty_urls`
  • Loading branch information
jclusso authored Jan 2, 2024
1 parent bd75129 commit 94f54f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@

echo "Updating netlify.toml with references to our built files"

CSS_PATH=`find output/_bridgetown/static/css/*.css -type f | sed -e 's,output\/,/,g'`
JS_PATH=`find output/_bridgetown/static/js/*.js -type f | sed -e 's,output\/,/,g'`
CSS_PATH=`find output/_bridgetown/static/*.css -type f | sed -e 's,output\/,/,g'`
JS_PATH=`find output/_bridgetown/static/*.js -type f | sed -e 's,output\/,/,g'`

echo "CSS Path: ${CSS_PATH}"
echo "JS Path: ${JS_PATH}"

sed -i s,CSS_PATH,${CSS_PATH},g netlify.toml
sed -i s,JS_PATH,${JS_PATH},g netlify.toml
sed -i s,NETLIFY_IMAGES_CDN_DOMAIN,${NETLIFY_IMAGES_CDN_DOMAIN},g netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,8 @@
NODE_ENV = "development"
BRIDGETOWN_ENV = "production"

[build.processing]
skip_processing = false
[build.processing.css]
bundle = false
minify = true
[build.processing.js]
bundle = false
minify = true
[build.processing.html]
pretty_urls = true
[build.processing.images]
compress = true

[[headers]]
for = "*"
Expand All @@ -34,8 +24,7 @@
[headers.values]
Link = [
"<CSS_PATH>; rel=preload; as=style",
"<JS_PATH>; rel=preload; as=script",
"<https://NETLIFY_IMAGES_CDN_DOMAIN>; rel=preconnect"
"<JS_PATH>; rel=preload; as=script"
]

[[headers]]
Expand Down

0 comments on commit 94f54f3

Please sign in to comment.