Use YAML enclosing formatting for Metadata export via MMD

Multimarkdown allows the use of YAML enclosed block formatting using — and this is required by Pandoc for metadata. Currently Scrivener just uses standard export without the enclosing —

It would be great if Scrivener could adopt the —\n metadata\n— formatting to make metadata work by default with both Pandoc and MMD without any postprocessing. As I understand it there should be no downsides (except for possibly compatibility with old versions of MMD)

---
Author: John Doe
---

Rest of Document here...

I’ve put it on the list to look into. For now though, you can do whatever you really want to do with meta-data by creating a document called “Meta-Data” and putting it at the very top of the compile group (or Draft).

Hi AmberV, good to know but just a minor (probably obvious but nevertheless annoying) point that this trick is incompatible with Front Matter. I’ve always used Front Matter to generate my title page (academic journal articles always require a title page) without having to have it in my draft. So I suppose it would be easier to make the compile meta-data work with pandoc rather than adding more workarounds for this “special” draft document. 8)

The important thing isn’t the Draft folder, merely that it be at the top of the compile list. How it gets there is up to you.

When it comes to front matter, I’ve always put the meta-data file at the top of each front-matter folder. If there are different outputs, I often need different meta-data anyway, and that makes it easier to switch values on the fly rather than use a central setting.

The system is pretty flexible in that the meta-data file will merge with any defined compile meta-data, meaning you can define some core stuff in compile settings, like “Author”, and then supply specific information, like Title or maybe Base Header Level, at different compile targets—front matter folders, compile group subfolders, collections, etc.

The only problem I have is that i use the Binder title of the Front matter as the Markdown generated title (compile>formatting), and this breaks the YAMLesque metadata from being the top of the front matter document. I can’t turn title off only for the front matter document as it also affects all the other documents on the same level (document outside the draft is still considered as Level 1). I would be happy to be able to turn off the title for the front matter only, perhaps there is a trick to do that which doesn’t affect the other docs in the hierarchy?

If I understand correctly, if you set the front matter container to Compile As-Is that should do the trick.

Yes, that works great, thanks (and yes I should have RTFM)! :unamused: 8)