Document meta data and all variables are stored in an external YAML file. These variables can be edited directly within the editor. Variables can be used within the document and within text-based diagram descriptions (such as GraphViz and anything else supported by https://kroki.io/).
There's also a command-line interface for integrating into CI/CD pipelines or similar workflows.
IMO, there's no such thing as a WYSIWYG Markdown editor. Markdown is a plain text format that defines neither presentation logic nor formatting instructions. Markdown editors typically convert documents to HTML and then display the HTML with CSS to adjust the look and feel.
KeenWrite is what-you-see-is-what-you-mean editor, similar to LyX. The preview panel shows the content having been converted to XHTML and formatted with CSS. When producing a PDF file, the XHTML is sent through the ConTeXt typesetting software and formatted according to the instructions associated with a user-defined (or user-selected) theme. While the XHTML preview is rendered in real-time, the typesetting is not real-time.
Well, Markdown as a format is intended to be viewed rendered as HTML (or equivalent), and WYSIWYG means that the editing takes place in the rendered representation. Markdown is only a storage format then, that merely happens to also be human-readable. That the is rendered representation itself is not fixed and can be styled or themed independently is not a contradiction IMO. But call it what you want.
The main reason I’m interested in WYSIWYG editing for Markdown is that I find monospaced fonts to be too hard on the eyes for editing prose text of any length. But due to lists and code fragments and the like, just switching to a variable-width font in a plain-text editor is also not very practical.
Yes, I have. I disagree with adding YAML headers into documents because it inevitably mixes presentation with content. KeenWrite takes a different approach in keeping presentation completely separate, allowing the content to vary independently. Aside, KeenWrite generates XHTML documents as an intermediary step towards producing PDF files, making it an alternative site generator.
Nonetheless, if someone wants to use an existing site generator, they can do so while keeping their Markdown documents free of presentation logic. In Linux, it can be as simple as:
cat header.yaml source.md > combined.md
Then run the site generator on the combined output file.
In the screenshots, the theme-driven PDF output shows the same content presented in two different PDF files: one with a ToC and one without. Whether a table of contents is included is presentation logic, dictated by the typesetting engine configuration. If you place the ToC controls in the YAML header for the document, then it means having to change the content to add or remove the ToC. That then presumes the type of transformations the Markdown will undergo, which, IMO, defeats the purpose of a plain text document.