Since Codeberg Pages only hosts static pages, I was wondering if gzip or brotli compressions could be enabled?
Enable text compressions for Codeberg Pages #223
I vote for gzip as well.
If there are concerns about potential server hit and increased resource usage for compression on the fly, pre-compressed gzip files might be a good alternative (like educate users how to use gzip or zopfli on private computers, through documentation). Pre-compressed Brotli content might be even better.
Upvote for this issue! The alternative mentioned by @durad is also awesome, too! Also, upvote for the alternative!
Also want this in my website too
It would be nice if codeberg pages supported these features just like nginx.
gzip_static on;
brotli_static on;
So users can pre compress their site at the highest compression level thus making it easier for Codeberg to host.
Hi! I would be happy to test pre-compressing brotli on-device, before pushing to the repo. How can I do this?
Also, I did not know that enabling compression on the server would increase the load. By how much? Is it that significant?
FWIW, #387 added the ability to pre-compress files and covers most of the use cases for this. It supports the three main formats browsers support: gzip, brotli, and zstd. It's not live on codeberg.page yet since I believe there would have to be a release to do that.
Not sure whether we'd ever want to support "automatic" compression, though. It feels like it would have to involve some kind of more-permanent caching of the compressed versions for performance, since a static site only needs to compress its assets once.
Figure that the maintainers can decide whether this counts as "solved" or not.
That solution is very inconvenient
Something is not working
When this label is set, Pull Requests will build and publish images for testing purposes
Something is not correctly documented
This issue or pull request already exists
New feature
easy to contribute
An improvement to the existing code or an existing feature
Something is wrong
More information is needed
improve performance
Maintain existing code
More research is needed to solve the issue
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?