💾 Archived View for midnight.pub › replies › 528 captured on 2023-03-20 at 21:14:43. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

< A little experiment

Parent

~starbreaker

Thanks, but I've tried pandoc templates for html. I find them better suited for converting novel drafts to Word using a publisher's house style. :) The problem is that if I want to use a different set of <header> and <footer> blocks for my home page vs other pages, or for posts vs pages, that ends up complicating my makefile unless I set variables in my YAML block to control which parts of the template get rendered (since pandoc's include_before and include_after affect what goes before and after <body>. If I stick with m4, I can just include the appropriate headers and footers in individual files and apply a single transform.

Also, I don't want to be too dependent on pandoc. It's a pain in the ass to build on OpenBSD since there isn't a port/package for it. I've just been using pandoc as an example of a markdown converter because I figure it's better-known than other tools. I've been using m4 because it comes with OpenBSD's default install.

Write a reply

Replies

~pink2ds wrote (thread):

Right, so what you could do is make a pandoc template that writes an m4 template just like my last example there.