But ... I vaguely recall hearing somewhere that htmlgen is slated for removal from the standard library. But I might be remembering wrong.
Is it slated for removal?
If so, I'll skip it.
Also, should I categorize that source code filters are the "officially recommended way" to generate html? Or is that extrapolating too much?
You can use any of the macro-based html-generating nimble libraries or create your own html builder. Not sure why would you use something like moustache when macros exist.
There are pros and cons to each direction.
I use the macro approach on one of my larger websites. It now takes 8 minutes to compile every time I change to a web page (and a new submission to the docker of the exec). Nor can I allow self-manipulation of pages via the web interface ala wordpress-style. (Though, for some pages, that is a good thing.) It is insanely fast though. A minimal docker instance can handle a phenomenal amount of traffic.
So, for something like an API or a Karax backend, a template library is likely bad idea. For a large traditional page-centric web site, it scales better, IMO. As always, it depends on the details.