Skip to content

Unify frontmatter under one AST node. - #25

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
codex/unify-frontmatter
Oct 12, 2026
Merged

samuel-williams-shopify merged 1 commit into
mainfrom
codex/unify-frontmatter

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown

Represent every supported frontmatter form with Node::Frontmatter. Untagged --- and +++ retain an empty authored info string and resolve to YAML and TOML through language(); explicit language hints use the same interface.

The parser, AST helpers, and renderers now handle one frontmatter type. All forms retain their raw body, including its trailing line ending, and use one Markdown serializer. When edited content requires replacing a dash or plus delimiter with a code fence, the serializer writes the implied language explicitly.

This changes the public AST: Node::Yaml, Node::Toml, and their structs are removed, and serialized ASTs use type: "frontmatter" with info and fence fields. Release notes describe the changes callers need to make.

@samuel-williams-shopify
samuel-williams-shopify merged commit cdbeecc into main Oct 12, 2026
4 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the codex/unify-frontmatter branch October 12, 2026 04:04
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