Releases: djc/askama
0.6.2
0.6.1
0.6.0
Finally, another release of Askama, the type-safe compiled Jinja-like Rust templating library. The biggest feature in this release is the support for match
blocks, making it possible to do pattern matching in templates. An example is provided in the documentation.
- Implement basic match functionality (thanks to @anowell)
- Add support for importing template files with macros (fixes #51, thanks to @larros)
- Fixed implementation of Rocket
Responder
which was broken in the 0.5.0 release - Infer Content-Type from the file extension for Iron integration (thanks to @hajifkd)
- Add support for array literals (fixes #59)
- Add support for tuple indexing (thanks to @larros)
- Numerous bug fixes
Thanks to everyone who has contributed to Askama!
0.5.0
Discussing the 0.4.0 release made me think I should quickly make one further change: inferring the escape mode from the template path
, or a specified extension if you're using the source
attribute. This means escaping is now only on by default for templates with a html
, htm
, or xml
extension. In addition, this release escapes more characters, according to the OWASP recommendations.
If you spent time making changes for the 0.4.0 upgrade already, sorry about the churn! I believe this minimizes boilerplate and hopefully doesn't introduce too much magic.
0.4.0
Roughly six months after announcing the first public version of Askama, 0.4.0 feels like a large update.
There are some breaking changes compared to the 0.3.0 series:
&
,<
and>
are replaced with HTML character entities by default (see #23)- Run-time errors are now returned via custom
Error
andResult
types
Other noteworthy new features include:
- Optional integrations for Rocket and Iron (see examples for Rocket and Iron)
- Support for defining variables, user-defined filters, includes and macros
- Inheriting templates no longer have to use
_parent
to refer to fields from the parent context Template
implementations now automatically implementDisplay
- Better robustness and more explicit error handling through panics at compile time
- Much faster compilation in some edge cases with nested binary operators
Special thanks to those who have contributed to this release, in particular @anowell and @defyrlt.
Please post your feedback or questions as an issue or join the chat!
0.3.4
0.3.2
0.3.1
0.3.0
- Hide
askama_derive
crate usage insideaskama
, making it easier to use (#2) - Better support for
Iterator
variants in for loops (#8) - Add support for having generic type parameters in template context structs (#11)
- Fix bugs around loop index attributes (#10)
- Improve error messages in case of errors (#3, #4)