mdless with document transclusion
The latest version of mdless, my most recent coding obsession, now includes MultiMarkdown document transclusion.
File transclusion is the ability to tell MultiMarkdown to insert the contents of another file inside the current file being processed.
You can include a document by inserting a relative path between two pairs of curly brackets:
{{myfile.md}}
The path is relative to the current document, which won’t work if you’re piping text to mdless. In that case it would need to be an absolute path, or have transclude base
specified in the metadata.
To provide a base for transclusion paths, just add transclude base
to your document’s metadata, either as MultiMarkdown metadata, or as a YAML header:
transclude base: ~/Documents/myproject/chapters
It’s probably not a super useful feature to 90% of mdless users, but should be handy for some.