xm
xm copied to clipboard
Idea: Serve markdown files as html pages
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>
@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.