Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pre-compressed gzip files #1674

Closed
ghost opened this issue Dec 5, 2015 · 11 comments
Closed

Add support for pre-compressed gzip files #1674

ghost opened this issue Dec 5, 2015 · 11 comments
Labels

Comments

@ghost
Copy link

ghost commented Dec 5, 2015

Bountysource

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.

@mjanda
Copy link
Contributor

mjanda commented Jan 8, 2016

Instead of gzip -9, why not use zopfli? Compatible and better compression.

@ghost
Copy link
Author

ghost commented Jan 8, 2016

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.

@ghost
Copy link
Author

ghost commented Jan 8, 2016

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?

@bep bep added the Stale label Feb 27, 2017
@bep
Copy link
Member

bep commented Mar 1, 2017

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.

@bep bep closed this as completed Mar 27, 2017
@zivbk1
Copy link
Contributor

zivbk1 commented Jul 25, 2018

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.

@zivbk1
Copy link
Contributor

zivbk1 commented Aug 6, 2018

@bep now that you have implemented minification, can we open this issue back up to add gzip compression as a final step?

@bep
Copy link
Member

bep commented Aug 6, 2018

No.

@mateusfccp
Copy link

mateusfccp commented May 8, 2019

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.

@LeonB
Copy link

LeonB commented Feb 12, 2020

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.

@pierredewilde
Copy link

I have naively tried hugo server --minify --compress but it does not work 🤔

The idea was to catch performance issues with DevTools Lighthouse in production-like mode.

Of course, we can do it with hugo --minify and serve /public with another HTTP server.
But it would be nice if it was built-in within Hugo.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants