From aa3acc264c102c4dc273252a2a41024afb04fe25 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Mon, 5 Jun 2017 11:40:22 +0200 Subject: [PATCH] Add prepare script --- prepare.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 prepare.sh diff --git a/prepare.sh b/prepare.sh new file mode 100755 index 0000000..15ea5ed --- /dev/null +++ b/prepare.sh @@ -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" \;