Skip to content

Add support for YAML metadata blocks #4

@reasonableperson

Description

@reasonableperson

Hi, thanks for releasing this library! Pandoc's yaml_metadata_block extension allows you to insert front matter at the top of a Markdown document in the form of an arbitrary YAML object delimited by ---. It would be useful for Rimu also to support this.

YAML is implemented in std/encoding, so I was able to put together a rough patch pretty easily. However, it breaks the API by awkwardly changing the type of the exported render function to return a [metadata, html] tuple. The name render suggests that Rimu is not intended to do anything other than consume Markdown and emit HTML.

Let me know if you're interested in a more comprehensive PR that implements this properly, perhaps by exporting a metadata function. Otherwise, I'm happy to implement this in my own code, and you can just close this issue as a record of the fact that YAML metadata blocks are out of scope for Rimu.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions