So I came up with a mini markup language built around directives and fenced blocks. A simple template import allows MD semantics (the stuff I care about) in the project. The idea is that the core is stable. You simply write schema validators for your schema and transformers for the output format. Probably 2-300 lines of python all-in-all for a "book+chapters" schema with an html transformer.
I did not fall into the trap of implementing a Turing complete programming language in it like so many other systems. If you want behavior, piggyback on directives and write a python transformer to manipulate the AST.
I got interested in something else soon after, so it will probably be a few more months till I have the time and the inclination to finalize and publish everything.