#15 awareness
This commit is contained in:
parent
b33c98958d
commit
6f3beb6368
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,11 @@ use minify_html::{minify, Cfg};
|
|||
pub fn render_html(template: &dyn DynTemplate) -> String {
|
||||
let data = template.dyn_render().unwrap();
|
||||
|
||||
// we just minify before sending to the client,
|
||||
// we need to find a way to pre-minify static pages to the dist folder,
|
||||
// maybe in release mode? to make debugging easier
|
||||
// from https://git.mylloon.fr/Anri/mylloon.fr/issues/15
|
||||
|
||||
let cfg = Cfg::spec_compliant();
|
||||
String::from_utf8(minify(data.as_bytes(), &cfg)).unwrap()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue