Last active
September 17, 2024 05:44
-
-
Save christo/86245bff11846e21a1171c4ea46f56ac to your computer and use it in GitHub Desktop.
Demonstrates problem using hakyll with .md file extension for markdown files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# for me generated example passes but modified example fails | |
testdir="$(date +%s)-test" | |
function check() { | |
if !(cabal build && site rebuild && site check); then | |
popd; echo; echo failed on $1; exit 1 | |
else | |
echo; echo success on $1 | |
fi | |
} | |
hakyll-init "$testdir" | |
pushd "$testdir" | |
check "generated example" | |
mv about.rst about.md | |
mv contact.markdown contact.md | |
perl -pi -e 's/\.(markdown|rst)/.md/g' site.hs | |
check "modified example" | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment