mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 04:58:26 -04:00
try to speed up builds
This commit is contained in:
parent
f2fb8e812c
commit
6f62c4dff5
@ -15,7 +15,7 @@ I keep an ongoing list of [blog post ideas](https://github.com/jakejarvis/jarv.i
|
||||
|
||||
This site runs a [custom version](https://github.com/jakejarvis/hugo-custom) of [Hugo Extended](https://github.com/gohugoio/hugo) with a few (very opinionated) changes. To ensure consistency, the [`Dockerfile`](Dockerfile) in this repository will pull my Hugo [fork](https://github.com/jakejarvis/hugo-custom) (forked from `v0.53-DEV`, [gohugo/hugo@`a28865c`](https://github.com/gohugoio/hugo/tree/a28865cfc3e296cf0ddd0bd6c1368fcdb2154d0f) and pre-built on [Docker Hub](https://hub.docker.com/r/jakejarvis/hugo-custom) and [GitHub Package Registry](https://github.com/jakejarvis/hugo-custom/packages)) and run a live testing server.
|
||||
|
||||
Run these commands on the root of this repository:
|
||||
Run [`./scripts/docker-server.sh`](scripts/docker-server.sh) from the root of this repository, or execute these Docker commands:
|
||||
|
||||
```bash
|
||||
docker build -t jarv.is:develop -f Dockerfile .
|
||||
|
@ -1,6 +1,6 @@
|
||||
# netlify.sh downloads my custom Hugo fork and builds the site independently.
|
||||
[build]
|
||||
command = "./scripts/netlify.sh"
|
||||
command = "./scripts/netlify-build.sh"
|
||||
publish = "public"
|
||||
|
||||
|
||||
@ -18,11 +18,11 @@
|
||||
[[redirects]]
|
||||
from = "/feed"
|
||||
to = "/index.xml"
|
||||
status = 200
|
||||
status = 301
|
||||
[[redirects]]
|
||||
from = "/rss"
|
||||
to = "/index.xml"
|
||||
status = 200
|
||||
status = 301
|
||||
|
||||
# Moved Y2K site to its own subdomain:
|
||||
[[redirects]]
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Make sure you run this script from the root of the site repository...
|
||||
# Make sure you run this script from the root of the site repository.
|
||||
|
||||
echo "Pull latest Docker image..."
|
||||
docker pull jakejarvis/hugo-custom:latest
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Make sure you run this script from the root of the site repository...
|
||||
# Make sure you run this script from the root of the site repository.
|
||||
|
||||
echo "Pull latest base image..."
|
||||
docker pull jakejarvis/hugo-custom:latest
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# only designed to run on Netlify's build image:
|
||||
# only designed to run on Netlify's build image
|
||||
# https://github.com/netlify/build-image
|
||||
|
||||
set -euo pipefail
|
||||
@ -30,7 +30,7 @@ curl -sS -L https://github.com/imagemin/optipng-bin/raw/master/vendor/linux/x64/
|
||||
chmod +x $BINDIR/optipng
|
||||
|
||||
# make sure everything's OK
|
||||
echo "Is Hugo ready..?"
|
||||
echo "Is Hugo ready?"
|
||||
$BINDIR/hugo-extended version
|
||||
|
||||
# build Hugo site
|
||||
@ -42,7 +42,7 @@ echo "Optimizing JPEGs..."
|
||||
find ./public -iname "*.jp*" -print0 | xargs -0 $BINDIR/jpegoptim --max=80 --strip-all --quiet
|
||||
echo "Optimizing PNGs..."
|
||||
find ./public -iname "*.png" -print0 | xargs -0 $BINDIR/pngquant --quality=50-70 --speed 3 --ext=.png --force
|
||||
find ./public -iname "*.png" -print0 | xargs -0 $BINDIR/optipng -o3 -force -strip all -quiet --
|
||||
find ./public -iname "*.png" -print0 | xargs -0 $BINDIR/optipng -o1 -force -strip all -quiet --
|
||||
|
||||
# remove binaries (kinda unsafe, but doesn't really matter b/c it's docker)
|
||||
echo "Cleaning up binaries..."
|
Loading…
x
Reference in New Issue
Block a user