Askama Versions Save

Type-safe, compiled Jinja-like templates for Rust

0.6.2

6 years ago

Some great bug reports came in after the 0.6.0 and 0.6.1 releases last week, which I fixed:

  • Fixed problems with using nested filter (or macro) calls in expressions (#78)
  • Add documentation and tests for comments, after an issue with whitespace surrounding comments was found (#79)

0.6.1

6 years ago

This is a quick bugfix release for #73: due to an unsupported way of including syn, Askama had a run-time dependency on proc-macro, which didn't work well in some scenarios. Thanks to @dtolnay for the bug fix.

0.6.0

6 years ago

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

6 years ago

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

6 years ago

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 and Result 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 implement Display
  • 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

6 years ago
  • Add support for chained attributes (fixes #22)
  • Fix edge cases in content literal parser (fixes #24)

0.3.2

7 years ago
  • No longer need to use std; or use askama; in template modules (#17)
  • Add lower, trim and upper filters (#16, #19)
  • Documentation improvements, including an explanation of inheritance pitfalls

0.2.1

7 years ago
  • Add code coverage tracking through codecov.io
  • A number of documentation improvements

0.3.0

7 years ago
  • Hide askama_derive crate usage inside askama, 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)

0.3.1

7 years ago
  • Prevent errors due to type parameter defaults in generic types (#12)
  • Some documentation improvements