I would like to propose a seemingly minor, but powerful enhancement to pandoc's metadata parser.
Right now, pandoc parses % title text % author text % date text
at the start of the file, inserting the contents of these fields into the variables with the names: $title$, $author$, and $date$
I would like to propose the following metadata format: % fieldname: contents % fieldname2: contents2 ... % fieldnameN: contentsN
The idea being, the variable $fieldnameN$ will be set to "contentsN", as if the user had specified -V fieldnameN="contentsN"
If no colon-delimited fields are found, the old metadata format would be used. For ease of processing, I might assume that the metadata is at the start of the file only (with no blank lines).
This would also keep me from forgetting what order to put the metadata in, as I could simply state it explicitly:
% title: my document % author: kj % date: 20100216
Motivation: Right now, I am extracting the contents of my CMS into static markdown text, and I would like to preserve the existing metadata fields. There is not currently a mechanism to do so, except perhaps to include them in HTML comments, and postprocess using a scripting language
Comment #1
Posted on Feb 17, 2011 by Grumpy DogIf you search the pandoc-discuss archives, you'll see quite a bit of fairly recent discussion of metadata extensions. I'm sold on the general idea, but I want to get the details right, and there are a lot of considerations.
Status: New
Labels:
Type-Enhancement
Priority-Medium