Add prepare script

This commit is contained in:
Valentin Brandl 2017-06-05 11:40:22 +02:00
parent 369c392927
commit aa3acc264c
Signed by: vbrandl
GPG Key ID: CAD4DA1A789125F9

9
prepare.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env sh
HUGO_BIN="hugo"
# build static pages
${HUGO_BIN}
# ahead of time compression and timestamp fixing
find public/ -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' -o -name '*.xml' -o -name '*.svg' \) -exec gzip -v -k -f --best {} \; -exec touch -r {} "{}.gz" \;