mkdocs-semiliterate/tests/sites.bash

15 lines
409 B
Bash
Raw Normal View History

set -e
startdir=$PWD
for file in tests/fixtures/*
do
cd "$startdir/$file"
mkdocs -v build
# unfortunately MkDocs writes the run date in the last few lines of index:
head -n -3 site/index.html > site/croppedindex.html
rm site/index.html
diff -r -x img -x fonts -x js -x '*.xml*' refsite site
echo "Site in $file built successfully"
rm -r site
done
echo "All site tests passed."