3

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.

2 Answers 2

8

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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