I was about to drop the m4 experiment, but.. not yet. I want to split up
the big man pages into chunks that are easier to deal with, so now using
m4 for that (only. Pandoc is taking care of selective content stripping
and other rendering adjustments.)
I've switched the suffix of m4-enabled files from .md.m4 to .m4.md -
less correct but activates more useful editor highlighting.
The new m4manpages, m4webmanpages targets generate nroff and markdown
man pages via an alternate, excitingly complicated process, involving
shake, hakyll, pandoc *and* m4. Currently just the hledger man page is
processed this way, and the output (hledger/doc/m4-hledger.1,
site/m4-hledger.1.md) is equivalent to that of the non-m4 process.
Pro: selecting and massaging web/man content may be smoother with m4
than with pandoc filters. File inclusion allows documentation to be
broken up into chunks, which may be easier to edit, reorganize and
reuse. Macros could reduce boilerplate and enable more featureful and
attractive docs.
Con: the non-m4 process was simpler, easier to for contributors to
understand and working well enough. YAGNI.