leven
leven copied to clipboard
support for optional hugo-style metadata block
E.g.:
+++ date = "2016-12-09T00:00:00+02:00" +++
Currently supports a date and a title field. If they are present they override the built-in approach of leven.
Sorry for the late reply! Thanks a lot for this pull request, but I have a few questions:
- I know that this is the same syntax that Hugo uses, but do you think there could be a better delimiter for frontmatter than
+++
? - Do you think this would be more useful if users could put arbitrary metadata in the post, that would be accessible to the rendering template, instead of just the title and the date? This might lead to more flexibility, and I can implement it if you're too busy. :)
- This is really irrelevant, but in
metadata.rs
, you have an unnecessary.collect()
and alog!
that I think was just for debugging.
Heya,
- I'm open for other suggestions for a delimiter. Like you said I used what hugo uses. Feel free to select something else if you think it fits more to the style of your program.
- Yeah, I've been considering that as well. Could deserialize it to a generic serde Map. I'll give it a stab.
- I'll check it out and clean it up.