Metadata syntax (was Universal syntax for Markdown)
jgm at berkeley.edu
Sun Sep 18 13:47:52 EDT 2011
Yes, the key question is: what's the right balance of flexibility vs.
To my mind, multimarkdown comments just aren't flexible enough:
* There's no way to have multiline metadata fields that contain
blank lines, e.g. an abstract with two paragraphs.
* There's no provision for structured data (e.g. key/value
tables or lists), or for boolean or numerical fields.
* Metadata fields are interpreted as raw strings, not markdown.
That's sometimes what you want, but not always. Titles
often contain emphasis and other formatting, for example,
and sometimes even footnotes (for acknowledgements). If
these are just going into an html meta field, it doesn't much
matter, but if you're using the metadata fields in templates,
it does. (And sure, you could always run a raw string through
your markdown processor again, before passing it to the template engine,
but that creates problems for things like reference links and
Another major problem, in my view, is that if a document starts
with a phrase followed by a colon, it gets swallowed into metadata:
To be or not to be: that is the question.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<meta name="tobeornottobe" content="that is the question."/>
That's not what most authors would expect!
For this reason, I would favor something more like reStructuredText
field lists, which marks the fields explicitly as fields:
:title: Here is the title.
:abstract: The abstract here.
It can span multiple lines.
As long as the indentation is maintained.
This is not part of the metadata.
This is slightly less texty because of the leading colon, but less likely to
capture regular text.
Also, because this is recognizable as metadata wherever it occurs
in the document, one could then drop the requirement that the
metadata occur at the top of the document, which I think is
undesirable. When there's lots of metadata, it's nicer to put
it at the bottom (or at least to put some of it at the bottom),
so it doesn't interfere with reading the article. lunamark's
lua_metadata allows that, by the way -- so you don't have to
start the document with something that doesn't look like plain
One nice point that David Sanson made is that one could combine
a simple, "texty" metadata format for common things like titles
and authors with a flexible, more "cody" format for everything else.
One should keep this in mind in thining about how to balance flexibility
+++ Fletcher T. Penney [Sep 18 11 12:06 ]:
> I think the idea of metadata boils down to three perspectives:
> 1) I don't want it/need it/care about it --- get rid of it
> 2) I want something easy to write, easy to read, and fits with the Markdown philosophy of as little markup as possible to accomplish the job ---even if not quite as powerful (e.g. MultiMarkdown)
> 3) I want something powerful/flexible, even if it looks like computer code at the top of my document (e.g. lunamark)
> Before there can be a unified standard, there has to be a unified philosophy (just like the rest of the "standards" debate on the list).
> My philosophy, and therefore that of MMD, is #2 above. I obviously have more markup than plain Markdown, but I feel that my "feature to markup" ratio is as good or better than Markdown (obviously a personal opinion, not a fact). The metadata functionality is pretty powerful, fails gracefully when run through plain markdown (if you remember the extra two spaces at the end of lines), but does have some limitations.
> I reiterate one of my previous posts - if we want to have any sort of consensus for the Markdown derivatives, the first step is agreeing on a philosophy for those standards. Individual variants can still have their own features, but we would need agreement on the core.
> On Sep 18, 2011, at 11:53 AM, John MacFarlane wrote:
> > +++ David Sanson [Aug 17 11 23:09 ]:
> <snipped for brevity - please see original posts>
> Fletcher T. Penney
> fletcher at fletcherpenney.net
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.net
More information about the Markdown-Discuss