9 lines
266 B
Rust
9 lines
266 B
Rust
use askama::DynTemplate;
|
|
use minify_html::{minify, Cfg};
|
|
|
|
pub fn render_html(template: &dyn DynTemplate) -> String {
|
|
let data = template.dyn_render().unwrap();
|
|
|
|
let cfg = Cfg::spec_compliant();
|
|
String::from_utf8(minify(data.as_bytes(), &cfg)).unwrap()
|
|
}
|