Open
Description
While building sites I like to keep an eye on the transfer sizes of pages. This helps me keep sizes under control as I develop. However, because zola serve
doesn't use any compression, these metrics in local development do not reflect production. This is especially true with text-based assets like HTML, JS, and CSS, which often compress very well.
If zola serve
supported automatic gzip encryption, I would more easily be able to optimize for size where needed.
This could be done a few ways:
- Just enable it unconditionally in
zola serve
- I can't think of a use-case where this would be problematic, but I could be wrong - Enable it by default, allowing an opt-out flag like
zola serve --no-compression
- Implement it behind an opt-in flag like
zola serve --gzip
Based on a glance through https://github.com/getzola/zola/blob/master/src/cmd/serve.rs any of therse approaches seem fairly straightforward to implement and I'd be happy to take a shot at it.