Standardized metadata layer?


#1

I’ve been working on project that standardizes the ‘metadata layer’ of my markdown documents. I’m now thinking about turning this into an open source project/tool, and I wasn’t sure how this project overlapped/interacted with the commonmark project.

My ‘metadata layer’ project, in short: If markdown is a standard way of structuing the content of documents, I’d like there to also be a standardized way of structuring the metadata of markdown documents. As I’ve been thinking of it, markdown just provides a way of formatting the text of the ‘content’ property of a larger ‘document’ data structure. Other properties of this larger data structure include standard markdown metadata (e.g. title, author, date), but can also include other useful data (e.g. document type, editor settings, output settings).

To give an example, a ‘handout’ document written in markdown might look something like this:

---
_type: handout
_editor:
    stylesheet: markdown.css
_output:
    html:
        toc: true
        css: handout.css
title: A Fancy Title
author: John Doe
date: April 29, 2017
---

# Here's a header

Here's some text

1. And
2. Here
3. Is
4. A
5. List

So I have two questions:

  1. Would this standardized metadata layer just be a superset of commonmark?

Is the spec specifying a data structure for markdown?
#2

This topic has come up before on this forum. We don’t think a metadata format should be standardized as part of CommonMark (see especially Metadata in documents). As you probably know, there are already a number of implementations that allow the use of YAML metadata. See for example lcmark and pandoc. There’s quite a bit of discussion on the pandoc bug tracker about various complexities that have come up in the real world; you may want to look there as you work out your ideas.