Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate brut frontmatter from custom frontmatter #45

Open
robinmetral opened this issue Aug 16, 2024 · 0 comments
Open

Separate brut frontmatter from custom frontmatter #45

robinmetral opened this issue Aug 16, 2024 · 0 comments

Comments

@robinmetral
Copy link
Owner

Depending on the project, frontmatter objects can get pretty big and there are essentially two kind of keys:

  • things used by brut (template, published_date, permalink, title, buildScript1, possibly others like is_draft, excerpt, or updated_date in the future, etc.)
  • custom frontmatter (e.g. featured_image, subtitle)

It would be nice to isolate one from the other. It makes things clearer and avoids scenarios where brut introduces a new key that clashes with an existing custom one.

Custom frontmatter could be under data for example:

title: My post
published_date: 2024-08-16
data:
  subtitle: Look at what I wrote today
  featured_image: cat.jpg

(Inspired by Cobalt again: cobalt-org/cobalt.rs#257)

Footnotes

  1. this might get deprecated soon

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

No branches or pull requests

1 participant