mkdocs-semiliterate/tests/sites.bash

15 lines
406 B
Bash

set -e
startdir=$PWD
for file in tests/fixtures/*
do
cd "$startdir/$file"
mkdocs 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."