Skip to content

v0.2.0

Pre-release
Pre-release

Choose a tag to compare

@kosude kosude released this 18 May 18:19
· 50 commits to main since this release
v0.2.0
9e8ec7c

This prerelease marks a massive improvement in template syntax and feature availability, thanks to the Tera template engine, which is now being used instead of me trying to do it all myself (which would have taken ages to get to the same level of quality!)

Tera's documentation should be consulted for info on syntax and built-in functions and filters, all of which can now be used in Devinit templates, in addition to logical control structures like if-else blocks and for-in loops.

Existing Devinit functions (licence and wrap*) have also been ported to the new engine.

Example template with the new update:

{% set mit = licence(id = "MIT") -%}

{# Print licence body with string substitutions, and word-wrapped to 80 characters per line. -#}
{{ mit.text
    | replace(from = "<year>", to = "2024")
    | replace(from = "<copyright holders>", to = "Ty Coon")
    | wrap(len=80)
}}

*wrap was previously added but not available in v0.1.0

Full Changelog: v0.1.0...v0.2.0