That would've been my choice a couple years ago and I still like this kind of setup for its transparency and maintainability. In fact, I've created sgmljs.net ("isomorphic" SGML + Prolog/Datalog + JavaScript-microservices web stack) to support both in-browser and (static or dynamic) backend preparation of your HTML, XML, or markdown files.
SGML has built-in dependency graph info so there's no need for Makefiles and OS command invocations. Unlike XSLT, SGML can parse and produce fully-featured HTML5. (Parts of) SGML constitutes a meta-language for injection- and XSS-free templating (designed to be non-Turing-complete, unlike XSLT). SGML also allows definition of custom Wiki syntaxes (sgmljs has full markdown support).
SGML has built-in dependency graph info so there's no need for Makefiles and OS command invocations. Unlike XSLT, SGML can parse and produce fully-featured HTML5. (Parts of) SGML constitutes a meta-language for injection- and XSS-free templating (designed to be non-Turing-complete, unlike XSLT). SGML also allows definition of custom Wiki syntaxes (sgmljs has full markdown support).