nbsp 0.0.1

non-breaking space: a thoughtful community forum platform
1
2
3
4
5
6
7
8
9
10
//! Glue for combining [`axum::response::Html`] and a rendered [`askama::Template`].

use askama::Template;
use axum::response::{Html, IntoResponse};

/// Render an [`askama::Template`] and then return it inside [`axum::response::Html`]
pub fn html(template: impl Template) -> impl IntoResponse {
    let render = template.render().expect("template render");
    Html(render).into_response()
}