On one site, that pulls data from an API and updates frontmatter, I added a small concern, so I can write:
# …
metadata.update title: "New title"
# …
This then finds the title key in the (yaml) frontmatter and updates the title value—or, if not present, add the key + value.
I like the API and see the value, but wondering if this opens up a can of worm and might be too cumbersome to maintain (mostly around making sure the formatting stays the same, ie no extra linebreaks, etc on frontmatter, but also any potentially addition of toml support next to yaml).
On one site, that pulls data from an API and updates frontmatter, I added a small concern, so I can write:
This then finds the title key in the (yaml) frontmatter and updates the title value—or, if not present, add the key + value.
I like the API and see the value, but wondering if this opens up a can of worm and might be too cumbersome to maintain (mostly around making sure the formatting stays the same, ie no extra linebreaks, etc on frontmatter, but also any potentially addition of toml support next to yaml).