why not just write Typst and avoid all the machinery?
Switching from Markdown to Typst is mostly switching out a few symbols.