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.
Hi, thanks for releasing this library! Pandoc's
yaml_metadata_blockextension 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 exportedrenderfunction to return a[metadata, html]tuple. The namerendersuggests 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
metadatafunction. 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.