Skip to content

Use simplematter to parse frontmatter#8

Open
remcohaszing wants to merge 1 commit into
mainfrom
simplematter
Open

Use simplematter to parse frontmatter#8
remcohaszing wants to merge 1 commit into
mainfrom
simplematter

Conversation

@remcohaszing
Copy link
Copy Markdown
Member

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything or linked relevant results below
  • I made sure the docs are up to date
  • I included tests (or that’s not needed)

Description of changes

simplematter handles some edge cases better than the regex used before. This is a breaking change.

  • simplematter supports Node.js 22 or greater. While it probably still works in Node.js 16, support isn’t guaranteed. For example its depencencies will likely break for these versions.
  • simplematter supports TOML frontmatter using the +++ fence.
  • simplematter doesn’t use an empty object as a fallback value. Top-level YAML values aren’t necessarily objects. They may be any YAML value.
  • simplematter treats empty frontmatter content as content. This means empty YAML content is parsed as null.
  • This changes the options to accept shallow merged simplematter options instead the yaml property.

I will update the docs if we agree to continue with this.

`simplematter` handles some edge cases better than the regex used
before. This is a breaking change.

- `simplematter` supports Node.js 22 or greater. While it probably still
  works in Node.js 16, support isn’t guaranteed. For example its
  depencencies will likely break for these versions.
- `simplematter` supports TOML frontmatter using the `+++` fence.
- `simplematter` doesn’t use an empty object as a fallback value.
  Top-level YAML values aren’t necessarily objects. They may be any YAML
  value.
- `simplematter` treats empty frontmatter content as content. This means
  empty YAML content is parsed as null.
- This changes the options to accept shallow merged `simplematter` options
  instead the `yaml` property.
@remcohaszing remcohaszing added 🦋 type/enhancement This is great to have 🗄 area/interface This affects the public interface 🧑 semver/major This is a change 🤞 phase/open Post is being triaged manually labels Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗄 area/interface This affects the public interface 🤞 phase/open Post is being triaged manually 🧑 semver/major This is a change 🦋 type/enhancement This is great to have

Development

Successfully merging this pull request may close these issues.

1 participant