You can also use m4; e.g. https://github.com/vkitchen/apostl
I remember investigating m4, I forgot why I didn’t use it, maybe I prefered the PHP way.
I’ve found a decent way to make static web page builders is to just use shell scripts that call cat with heredocs, like:
and stuff like that…
Yeah, I just automated the echos. Heredocs are slow overall.
I will always stan Pollen for this kind of thing.
Mixing the HTML with code resembles good old PHP :-) It is quite good for certain use cases. Sometimes I still use PHP this way (however I prefer languages like Java for not so small projects). Also old (pre-XML) JSP worked similarly.
I did some websites with XSLT+Make, so I know how powerful and simple this approach is.
PHP was an inspiration for pp(1). :)
Thanks for sharing.
I love seeing simple static site generators like this. I am currently using ssg.
Cool. Reminds me of @romanzolotarev’s ssg.
Or use Hugo. Or gatsby. There is dozens of preprocessors or static site generators. Your is using sh.