mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 17:58:29 -05:00
Merge pull request #2605 from alfredxing/proof-site
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#! /bin/bash
|
||||
|
||||
script/branding
|
||||
script/proof
|
||||
bundle exec rake
|
||||
|
||||
19
script/proof
Executable file
19
script/proof
Executable file
@@ -0,0 +1,19 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Check if any site files have changed
|
||||
if [[ $(git diff --name-only origin $(git log --pretty=format:"%h" -2 | tail -1) | grep '^/site') == "" ]]; then
|
||||
echo "No site files changed"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Site files have been changed, continue
|
||||
echo "Site files have been changed, proofing"
|
||||
if ! [[ $(command -v htmlproof) ]]; then
|
||||
echo "Installing HTML::Proofer"
|
||||
gem install html-proofer -- --use-system-libraries
|
||||
fi
|
||||
|
||||
printf "\nGenerating site... "
|
||||
jekyll build -s site -d _site -q
|
||||
printf "done.\n\n\e[0;36mProofing begins now!\e[0m\n"
|
||||
htmlproof ./_site
|
||||
Reference in New Issue
Block a user