minify css and js inside html + pass w3 validator
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

This commit is contained in:
Mylloon 2023-04-11 02:31:30 +02:00
parent fdd683c2c7
commit 568a864dc9
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -100,7 +100,12 @@ fn init(dist_dir: String, static_dir: String, templates_dir: String) -> String {
if cfg!(debug_assertions) { if cfg!(debug_assertions) {
".".to_string() ".".to_string()
} else { } else {
let cfg = Cfg::spec_compliant(); let cfg = Cfg {
keep_closing_tags: true,
minify_css: true,
minify_js: true,
..Cfg::spec_compliant()
};
// Static files // Static files
for entry in glob(&format!("{static_dir}/**/*.*")).unwrap() { for entry in glob(&format!("{static_dir}/**/*.*")).unwrap() {