use actix_web::{HttpResponse, Responder}; use askama::Template; #[derive(Template)] #[template(path = "index.htm")] struct IndexTemplate<'a> { text: &'a str, } pub async fn index() -> impl Responder { HttpResponse::Ok() .content_type("text/html") .body(IndexTemplate { text: "Hello" }.render().unwrap()) }