xm brings native-looking HTML includes with a lighter touch
Giuseppe Gurgone's xm is a small HTML preprocessor with a deliberately short feature list. Among those features is HTML includes—something the author notes he remains baffled that HTML doesn't support natively, since it has been consistently needed for decades and the language could have evolved to cover it. A CSS-Tricks link rounds up the many existing approaches to handling includes; xm joins them as another option.
What the author finds extra neat is that xm pairs includes with templating in a clean way rather than treating them as separate concerns. Nunjucks, by comparison, handles this by creating a template.njk, after which actual pages use that template.
The syntax in xm stays HTML-y. A template.html is defined, then used on a page, which the author calls very clean.
A further point in xm's favor: you can arbitrarily place a <markdown> tag anywhere you want and use Markdown inside it.




