Markdown file metadata

Does anyone have any suggestions for managing metadata in their Markdown documents? I mainly use markdown within novel writing. When I re-write a certain scene, I want to add some header comments in the file. This seems rather simple, but can anyone suggest the right syntax I should be using or share a structure that works for you?

This is the sort of thing that the “Notes” field in Ulysses excels at, but that’s not really internal to the document, which is what you seem to be looking for.

Unfortunately, there’s not really a standard comment syntax for Markdown, but some Markdown editors do recognize certain things as comments and not include them in the output. This ties you to one (or a small number) of particular Markdown editors though.

1 Like

True, but it’s limited to putting notes for the entire sheet you’re in. To create comment for a specific paragraph, or even a line-by-line basis, I’d recommend using Comments, which are readable inside documents without having to click on a link as with annotations, and they are excluded from printing and pdfs (unless you export as ‘Rough Cut’).

To me, this is one part of Ulysses that really needs to be improved upon. When you’re working on large sheets there may be numerous notes you want to make, and associate them with specific parts of the sheet, and the only ways to do that are with Comments or Annotations, which are both a little clunky. It would be fantastic to be able to have a Notes field with notes that can be markered like footnotes and easily viewable all at once in that Notes sidebar.

1 Like

Ulysses again, I use a comment blocks to put templates and text commetary on the sheets/documents. I use the notes function for research snippets usually a couple paragraphs or less. You can stick many paragraphs in a Ulysses note(s) but …cumbersome. Also Ulysses allows text to be broken in short files then arranged how you prefer. You can temporarly glued them together as if they are one document. When the project is done merge the pieces permanently.

Other apps have similar “skills” but Ulysses is my sweet spot, a just enough app.

Traditionally meta data is key / value pairs before the first blank line. That is what I process in my tooling1.

Because the metadata my tooling honours is about formatting I sometimes feel it would be nice to support metadata further down the file, essentially overriding the metadata at the top. But I don’t think this would be compliant with any flavour of Markdown.

  1. Which I’m not trying to advertise here.

Consider taking a look at CriticMarkup which is a markdown “plugin” with support for:

  • Addition {++ ++}
  • Deletion {-- --}
  • Substitution {~~ ~> ~~}
  • Comment {>> <<}
  • Highlight {== ==}{>> <<}

CriticMarkup comes with syntax plugins/extensions for

  • BBEdit
  • Sublime Text
  • Keyboard Maestro
  • TextExpander
  • OS X System Services
  • Command Line Preprocessor
1 Like

I use Grav as my CMS and all the posts are markdown formatted with YAML headers - so I took that and ran with it and now use YAML headers for any other files that need them. If you check it into GitHub and use their preview feature it shows it as a table above the rest of the text which can be quite handy too.