Skip to content

Add metadata.update key: value API? #158

@eelcoj

Description

@eelcoj

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions