jekyll/script/proof

21 lines
483 B
Bash
Executable File

#! /bin/bash
#
# Usage:
# script/proof
git diff --name-only origin $(git log --pretty=format:"%h" -2 | tail -1) | grep '^site/' || {
echo "No site files changed. We'll skip proofing."
exit 0
}
echo "Some site files have been changed! Proofing..."
command -v htmlproof || {
echo "Installing HTML::Proofer!"
gem install html-proofer -- --use-system-libraries
}
jekyll build -s site -d _site --trace
echo -e "\e[0;36mProofing begins now!\e[0m\n"
htmlproof ./_site