Yeah, Markdown + a custom template is the approach that I've recently been taking, though using Python instead of the shell script (but the shell script would be more interesting, now that I think about it).
The shell scripts used by the people I know are pretty simple, encapsulating the string of pandoc commands and pointing to an HTML template. Nothing fancy -- just a convenience when running a tool that they don't use very often.