Show HN: Bash Script to generate static responsive image web galleries
github.com
github.com
You can use very simple template language with sed or awk (just replace keywords with actual values for example).
Alternative: just rewrite it to command some template engine (no, I do not have any recommendations).
Edit: Positive side is that it is a single file, so I can see your point. But as the projects as multiple files anyway, it is perhaps still worth a consideration.
One idea / suggestion I have would be to use Isotope for layout: http://isotope.metafizzy.co/ Then you'd basically be able to generate a mini Pinterest...