philnash / jekyll-gzip

Generate gzipped assets and files for your Jekyll site at build time
https://rubygems.org/gems/jekyll-gzip
MIT License
37 stars 8 forks source link

Fix in place gzip #6

Closed k0nserv closed 5 years ago

k0nserv commented 5 years ago

In some scenarios in place gzip was not working instead producing files with some gibberish data and the file path. Reading the file_content before opening the file to write prevent this issue.

k0nserv commented 5 years ago

cc @philnash

k0nserv commented 5 years ago

Here's an example of what happens on my site without this fix

Screenshot 2019-03-31 at 22 14 01

I have branch showing this here. Try bundle install && JEKYLL_ENV=production bundle exec rake build && cat _site/index.html

philnash commented 5 years ago

Oh wow, that was pretty dumb of me. Sorry about this. Will merge!

philnash commented 5 years ago

Ok, this is merged and released as 2.1.1. Sorry about that again!