Archival 0.22.0
Addressing objects by their name now supported
Archival 0.22.0 is released, with a few small quality of life fixes as we push towards 1.0
Comment clobbering
archival format no longer deletes comments in archival files (although writing to objects via the editor still will - keep comments in object definition files!)
Slug Addresses
It felt non-intuitive that we couldn't address objects by their slug, since we have root object access that way. This enables things like {{ posts.something.name }} where something is the object file at objects/post/something.toml - note that if the slug has dashes, you have to use bracket syntax ["my-post"], which shouldn't be a surprise but is worth noting. This is especially useful when looking up fields, since that used to be:
{{sample_menus | where: "slug", "lunch" | map: "url" | first }} to get the URL, which not only is hard to read but has to map the whole array. That now condenses to {{ sample_menus.lunch.url }}, which I'd hope would be the first thing you'd think of.
Comments
Add your thoughts
Loading comments…