Skip to content

Instantly share code, notes, and snippets.

@christo
Last active September 17, 2024 05:44
Show Gist options
  • Save christo/86245bff11846e21a1171c4ea46f56ac to your computer and use it in GitHub Desktop.
Save christo/86245bff11846e21a1171c4ea46f56ac to your computer and use it in GitHub Desktop.
Demonstrates problem using hakyll with .md file extension for markdown files
#!/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