robinmetral / brut

brut as in béton brut (early alpha, probably don't use it)
https://brut.pages.dev/
5 stars 0 forks source link

Separate brut frontmatter from custom frontmatter #45

Open robinmetral opened 2 months ago

robinmetral commented 2 months ago

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

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: https://github.com/cobalt-org/cobalt.rs/issues/257)

[^1]: this might get deprecated soon