File-level metadata in Markdown?

Likes

Posted on: September 19, 2018

Posted by:

I wonder if anyone's thought about a way to add file-level metadata to a Markdown document. This just came up in a project I'm working on, but it's not the first time I've encountered it.

In Frontier's website framework, we used a # to delimit a value, something like:

  • #title "My Test Page"

We borrowed the idea from C on Unix in the 70s:

  • #include "mymacros.h"

We have the same thing in HTML and OPML, in the <head> section:

  • <title>My Test Page</title>

The directives are not part of the rendering. You don't see them when you read the document. But the values are available to software processing the document.

It seems since we're in The Age of JSON, something in JSON, delimited by a # might be appropriate?

  • #metadata = {
    • title: "Hello World",
    • tags: ["fun", "wisdom", "greetings"]
    • }

I started a thread on this on the Scripting News repo.


Read More

Related Products to this Post

Leave a Reply

Add New Comment

img