askama
askama copied to clipboard
Type-safe, compiled Jinja-like templates for Rust
There seem to be an error with the parsing when writing closures in the templates, for example with the following: **main.rs**: ```rust use askama::Template; #[derive(Template)] #[template(path = "hello.html")] struct HelloTemplate...
It should be possible to change the mime type of the templates. I use `.askama` for my templates and `.html` for raw html files, and I get `content-type: application/octet-stream` when...
Some templating engines support a streamlined "if content" block. For instance, in XenForo's templating engine, it looks like this.  Take for instance the following scenario which is very common...
Fixes #284 (and #398?) ## Example ```rust use askama::Template; #[derive(Debug, Clone)] struct User { name: String } impl User { fn ferris() -> Self { Self { name: "Ferris".to_string() }...
## main.rs ``` use actix_web::{get, Responder, HttpServer, App}; use askama_actix::Template; #[derive(Template)] #[template(path = "index.html")] struct IndexTemplate impl Responder { IndexTemplate { title: "Any fun in CooeeU" } } #[actix_web::main] async...
@vallentin I forget what things I still wanted to resolve before releasing... Do you have anything else you would like to land in the short term?
In the book, the following base template is used: ```html {% block title %}{{ title }} - My Site{% endblock %} {% block head %}{% endblock %} {% block content...
Hi - I imagine like most people, I don't care about whitespace being preserved and all of my templates should be escaped as if they are HTML. Is there any...
So here is the issue, in the current Jinja i can use a card.html which include something like this ``` {% block card_title %}{% endblock card_title %} {% block card_badge...
Same problem as #107, but I can't see the issue with my code. The error: ```rust cannot move out of dereference of `std::sync::RwLockReadGuard