#!/usr/bin/bash
# copy assets
cp -r assets/ dist/
make_page() {
name="$1"
title="$2"
cp templates/index.tmpl.html "build/$name.html"
sed -i "s/
/&$title/" "build/$name.html"
pandoc "pages/$name.md" > "build/$name-content.html"
sed -i "//r build/$name-content.html" "build/$name.html"
cp "build/$name.html" dist/
}
make_page index Home
make_page stuff Stuff