giuseppeg / xm

₪ extensible HTML
https://giuseppeg.github.io/xm
326 stars 9 forks source link

Idea: Serve markdown files as html pages #3

Open prawnsalad opened 4 years ago

prawnsalad commented 4 years ago

If I have a folder full of markdown files, it would be cool to support a import: base.html property in its frontmatter attributes. Ideally this would treat the markdown file such as:

<import src="base.html">
    <any fills other than the import attribute/>
    <markdown>the markdown</markdown>
</import>
giuseppeg commented 4 years ago

@prawnsalad that would be cool but unfortunately xm is just a compiler for HTML and it parses only such files. I think implementing this in xm would add too much complexity so probably it is better to prototype something in user land first.

You could try to write a script to turn md files into HTML files with imports and then run xm on them or maybe use blog engines like 11-ty or Jekyll which already support this feature.