Skip to content

Add frontmatter support#101

Open
magicmark wants to merge 1 commit intoleebyron:mainfrom
magicmark:add-frontmatter-support
Open

Add frontmatter support#101
magicmark wants to merge 1 commit intoleebyron:mainfrom
magicmark:add-frontmatter-support

Conversation

@magicmark
Copy link
Copy Markdown

@magicmark magicmark commented Mar 5, 2026

Summary

Adds a new "frontmatter" key to metadata.json that accepts an arbitrary key/value object. When provided, a styled <div> is rendered between the <article> and <header> tags, displaying each key/value pair in a monospaced box.

The use case for this is for GAPs - this data will automatically be added by the build before publishing.

cc @leebyron @benjie - happy to discard this if you want to avoid adding complexity to this project - i'm also happy to hack this into the generated .html files, but this feels a lil nicer.

Example metadata.json

{
  "frontmatter": {
    "id": "GAP-2001",
    "revision": "DRAFT",
    "status": "proposal",
    "authors": "Mark Larah",
    "sponsor": "@magicmark",
    "discussion": "https://github.com/graphql/graphql-spec/issues/1185"
  }
}

Rendered output

Screenshot 2026-03-05 at 1 47 20 AM
responsive views Screenshot 2026-03-05 at 1 47 13 AM Screenshot 2026-03-05 at 1 47 08 AM

🤖 Generated with Claude Code

@magicmark magicmark marked this pull request as ready for review March 5, 2026 07:28
@magicmark magicmark force-pushed the add-frontmatter-support branch from 90403cd to f83d285 Compare March 5, 2026 07:39
@magicmark magicmark changed the title Add frontmatter support to metadata.json Add frontmatter support Mar 5, 2026
@magicmark magicmark force-pushed the add-frontmatter-support branch 2 times, most recently from bb42a15 to 44b2fc2 Compare March 5, 2026 07:52
Add a new "frontmatter" key to metadata.json that accepts an arbitrary
key/value mapping. When provided, a styled div is rendered between the
<article> and <header> tags displaying each key/value pair. Values that
are HTTP(S) URLs are automatically rendered as links with the protocol
stripped from the display text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@magicmark magicmark force-pushed the add-frontmatter-support branch from 44b2fc2 to 2492663 Compare March 5, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant