Skip to content

Instantly share code, notes, and snippets.

@lizadaly
Created April 1, 2021 16:55
Show Gist options
  • Save lizadaly/3d7fefcccb82c0e45ea5dacae4d3bb16 to your computer and use it in GitHub Desktop.
Save lizadaly/3d7fefcccb82c0e45ea5dacae4d3bb16 to your computer and use it in GitHub Desktop.
rm -rf dist
mkdir dist
cp -r images dist
cp *.css dist/
echo "Writing index..."
pandoc index.md -o dist/index.html --template templates/default.html
for d in pages/*; do
mkdir -p dist/$d
for i in $d/*.md; do
f="${i##*/}"
f=${f%.*}
echo "Writing $d/$f.html..."
pandoc $d/$f.md -o dist/$d/$f.html --template templates/default.html
done
done
echo "Copying projects"
cp -r projects dist/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment