2

Has anyone successfully minified Craft's HTML templates?

Had setup a Grunt task but it had parse issues with the twig template tags. I since found that the Grunt task "HTMLmin" is only for the purposes of minifying "vanilla" HTML.

Is this even possible?

Any help or direction is greatly appreciated.

7

Here's a plugin I made that does just that:

https://github.com/khalwat/minify

6

There are several plugins that will minify/compress CSS/JS for you.

But for HTML, maybe you're better off just enabling gzip compression on your web server for all output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.