Most of the discussion around this has been in #1251. It seems these should be broken up into different parts, so this is the one I care the most about.
This is a feature request to have gzip -9'ed files generated along side the finished HTML, CSS, JS, etc.
Instead of gzip -9, why not use zopfli? Compatible and better compression.
Never heard of it before, so I looked it up: https://github.com/google/zopfli
Sounds like it could be even better. May want to make a Go binding for zopfli for a cleaner integration here.
I did one test and zopfli took 1m4s vs 0.4s for gzip -9. The output was less than 1% smaller.
Do you have any benchmarks showing it being worthwhile?
Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.
If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
I think that with Pipes in place, one of the last bits to finish the pipeline of generating a site for production would be to compress the files before pushing them to the hosting provider. It seems that other cases like this have gone stale and closed. I am hoping that this feature request can be reopened and used to implement this capability in Hugo.
@bep now that you have implemented minification, can we open this issue back up to add gzip compression as a final step?
No.
It would be great to have gzip and brotli on compilation as a option.
Any reason why it won't be implemented? Design decisions or manpower? Maybe I could help.
It would be nice to have this feature. With my current middleman site I gzip everything before rsyncing it to the server and let apache service the *.gz files directly.
Most helpful comment
@bep now that you have implemented minification, can we open this issue back up to add gzip compression as a final step?