halogenica / beautifulhugo

Theme for the Hugo static website generator
Other
1.13k stars 601 forks source link

Implement CSS minification #367

Open RoneoOrg opened 3 years ago

RoneoOrg commented 3 years ago

Hugo Pipes allow the minification of CSS assets

This branch is an implementation of this feature.

Key advantages:

The default behavior is set to use selfHosted files instead of CDNs, as it's required to take advantage of the minification.

Carefully tested with: Hugo 0.56 basic , Hugo 0.80.0 basic and Hugo 0.80.0 extended

RoneoOrg commented 3 years ago

The CSS used in shortcodes in now minified too

RoneoOrg commented 3 years ago

TODO: Potential improvement: make the minification optional via a Param in config.toml