Pardon my confusion on the thing you’re trying to do, but you are using the word styles to describe what sounds to me like Pandoc metadata, what would go within the --- markers in the document? You wouldn’t ordinarily use styles for that in Scrivener, that would be how you mark up text in the editor.
Using the metadata options in the Compile Overview?
Precisely so, I don’t know why that isn’t working for you. Perhaps a demonstration will help. There are two different approaches I take, depending upon the project, and this sample demonstrates both.
metadata_test.zip (72.6 KB)
-
First compile it using the given settings. To be clear, if you visit the Metadata tab in compile overview you will find I have cleared it entirely. Normally you would of course want to put your project-specific metadata, like the Title and Author, in here. Instead I’ve moved everything over to the compile Format’s own Metadata tab, so that you can very easily switch between the two methods without have to delete a bunch of stuff from the compile overview Metadata tab.
So to see what is going on there, just double-click on the “Compile Settings” Format, and look at the Metadata tab. This is the same tool as over in the main project’s Metadata tab. It is used the same way—the only difference is that “Insert Project Metadata Here” row that you can’t delete. That is where Scrivener would merge project-specific metadata into the YAML block, with what is here.
-
Next, select the “Binder Metadata” compile Format, and note how this will select the “Full Metadata” document for the Add front matter feature. You don’t have to use that, again this just makes the demonstration simpler, so you can click between the two Formats to get an idea of the different ways to do this.
You could just put this document at the top of the Draft folder. It’s worth bearing in mind that this will all become a single .md file when you compile, and there really is nothing “special” about this metadata block. It’s just text like everything else. But the Front Matter feature will be nicer if you want different chunks of metadata depending upon the compile Format you are using (which might dictate the type of file you get). And as you can see, each Format stores its own front/back matter settings so it’s a simple matter to flip between things and swap metadata sets.
Compiling with these settings, you should get an identical document.
Once that is done, check out the “Full Metadata” item in the binder. Of note, I am using a style here, but to be perfectly clear this is cosmetic only. I just use a style like this for metadata blocks so that the values all line up neatly and there is a little space between rows. It performs no function in the compile settings.
Which to use? It’s entirely up to you. I often just use a text section in the binder because that’s easier to me than messing around with the GUI. I can copy and paste it from an existing file, and that sort of stuff.