blog/build.sh

19 lines
387 B
Bash
Raw Permalink Normal View History

2023-03-16 00:08:25 -04:00
#!/usr/bin/bash
# copy assets
cp -r assets/ dist/
2023-03-18 05:29:58 -04:00
make_page() {
name="$1"
title="$2"
cp templates/index.tmpl.html "build/$name.html"
sed -i "s/<title>/&$title/" "build/$name.html"
pandoc "pages/$name.md" > "build/$name-content.html"
sed -i "/<main>/r build/$name-content.html" "build/$name.html"
cp "build/$name.html" dist/
2023-03-16 00:08:25 -04:00
}
2023-03-18 05:29:58 -04:00
make_page index Home
make_page stuff Stuff
2023-03-17 19:08:03 -04:00