File-level metadata in Markdown?

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 section:
My Test Page
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.

Original URL:

Original article

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: