Holy moly. I just want to take a Markdown file, a simple HTML template file, and generate some webpages. Is that too much to ask?? All the template engines and SSGs are trying to give me everything and the kitchen sink, which I don't need. Please tell me I won't have to write this myself...
pages.txt holds a newline separated list of the page names that I want to generate (index, codeofconduct, etc). We iterate over this list, using comrak (https://lib.rs/crates/comrak) to convert the MD to HTML, which is dumped in a temp file. The temp file is then `cat`ed together with the header and footer templates, which are just the top and bottom pieces of an HTML file.
omg I'd totally forgotten about `printf`! If nothing else, trying to get this tilde server off the ground has helped _me_ get better at doing things the UNIX way.
Problem solved, in a very UNIXy way!
```
#!/bin/sh
pages=`cat ./pages.txt`
for page in $pages;
do
$(which comrak) $page.md > $page.temp.html
cat header.template $page.temp.html footer.template > $page.html
done
rm *.temp.html
```