Markdown internal metadata Re: Markdown validity

Sean Leonard dev+ietf at seantek.com
Sat Jul 12 20:26:38 EDT 2014


I think I can move on to my next question:

It seems that all Markdown content is expected to appear inside of a 
block-level element in HTML parlance; i.e., inside <body> or one of its 
block-level descendants (<div>, <p>, <td>, <form>, <h1>...<h6>, etc.).

I tried to do some <head> stuff, as in:
http://johnmacfarlane.net/babelmark2/?text=%3Chead%3E%3Ctitle%3EHello+World%3C%2Ftitle%3E%3Cmeta+name%3D%22author%22+content%3D%22Alice%22%3E%3C%2Fhead%3E%0A%0AI+am+some+text.%0A%3Cdiv%3Eand+i+am+inside+*myself*%3C%2Fdiv%3E%0A%0AThe+end.

And not surprisingly, the results are all over the place. Clearly this 
is not an effective way to communicate HTML metadata, since Markdown is 
designed to process HTML block-level content.

Therefore, *when it matters*, what are strategies that Markdown users 
currently use to manage HTML metadata such as those metadata items 
defined in <http://www.w3.org/TR/html5/document-metadata.html> and 
<http://www.w3.org/TR/html401/struct/global.html#h-7.4>?

I am interested in items such as:
title
meta name info (author, generator, description, keywords)
link rel (stylesheet, icon, etc.)
language (either http-equiv content-language, or <html lang="XX">)
date [not part of HTML, but see pandoc_title_block]
?

I recognize that in many use cases, Markdown is for content fragments: 
stick this blob of text somewhere in a page and be done with it. But 
increasingly there are Markdown files (.md, .markdown) that are being 
treated as discrete documents. So for those latter cases, some metadata 
is desirable.

Are the following also true (or aesthetically agreeable)?
- there are no concerted CROSS-TOOL efforts to insert metadata into 
Markdown streams
   (I am aware of pandoc_title_block)
- inserting metadata into Markdown streams in a CROSS-TOOL way would be 
kludgey
   e.g. use an inert comment at the top:
   [/Title/]: # (This comment could include metadata)
   (but nobody does this)

-Sean



More information about the Markdown-Discuss mailing list