File-level metadata in Markdown?

Open
#95 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
json, markdown
Domain
documentation

Research direction

The issue proposes file-level metadata for Markdown using a new delimiter and JSON-like structure, but names no repository files, tests, or implementation entry point. Read the existing discussion and determine whether the project has a defined Markdown parser or metadata convention; the work is done only when the syntax and processing behavior are specified and accepted.

Written by the indexing model from the issue text.

Description

I wonder if anyone's thought about a way to add file-level metadata to a Markdown document. In Frontier's website framework, we used a # to delimit a value, something like:

#title "My Test Page"

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

<title>My Test Page</title>

The idea goes all the way back to C on Unix in the 70s:

#include "mymacros.h"

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"]
}

This just came up in a project I'm working on, but it's not the first time I've encountered it.

Dominant language
HTML
Stars
134
Forks
10
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/Scripting-News

All issues in scripting/Scripting-News

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.