CSS minification

Hello there,

I can’t see any CSS minification option in Hugo. Is there some external library I should use?

Thanks for any adivce.

Hugo doesn’t minimize CSS, You will need to do that with your own set of tools and build steps,

I use Gulp and like it a lot:

1 Like

On an added note here: I used to use Grunt - but Gulp is much speedier. You will notice this with Hugo’s livereload.

My setup does not do cssminification directly, but via LESS – but it should be easy to setup to do cssmin only.

@bjornerik Try gulp-load-plugins: https://www.npmjs.org/package/gulp-load-plugins

1 Like

Yes, the gulp-load-plugins made it less verbose.

On an added note - I found a newly introduced path-bug in the fingerprinting in the script above. Fixed now.