A few small features, and some small breaking changes in this release.
write_document method of
Statocles::Store::File now use
Statocles::Document instead of plain hashrefs.
It was weird to have one method (
read_documents with an
s) get document
objects, and everything else use hashes. The important
serialization/deserialization routines are in Statocles::Document, so it is
likely that more changes will happen around these APIs in the future.
Because of the above change, Stores now have a way to read a document from a string.
So, when a blog post is read from
<STDIN>, it can contain tags, links, and other
fields, instead of just content.
Some fixes to blog slugs to remove any non-word characters, and also reduce
every replacement to a single dash (
-), instead of having multiple dashes.
This only affects new posts, not existing posts, so if you want to fix your
current posts, you must fix them manually.
Finally, the Blog app now has a
method that can be used in templates and markdown to display the most recent
posts in a blog.
Full changelog is below.
- add recent posts method to the blog (#292)
- read documents on STDIN when adding blog posts (#289)
- fix warning if tags are missing
- change parse_document to parse_frontmatter
- add test with path field inside document
- allow document objects to be written via Store
- change read_document to return the Document object (#289)
- add method to parse a document from a string (#289)
- fix blog slugs to remove nonword characters (#290, #291)
- fix example plugin config for Beam::Wire changes
- describe using config to compose roles (#288)
- add exception when index app does not exist (#287)
- move template tests into a folder