README.md in jekyll-gzip-2.0.0 vs README.md in jekyll-gzip-2.1.0

- old
+ new

@@ -61,10 +61,12 @@ `Jekyll::Gzip` only runs when the environment variable `JEKYLL_ENV` is set to `production` as dealing with gzipping files is unnecessary in development mode and just slows down the site build. ### Configuration +#### Extensions + By default, `Jekyll::Gzip` will compress all files with the following extensions: - '.html' - '.css' - '.js' @@ -82,9 +84,18 @@ gzip: extensions: - '.html' - '.css' - '.js +``` + +#### Replacing the original file + +If you host your Jekyll site on AWS S3 you can take advantage of `Jekyll::Gzip` for compressing the whole site. The only difference is that you need to replace the uncompressed file with the gzipped file (that is, without a `.gz` extension). To enable this in `Jekyll::Gzip` turn the `replace_files` setting to `true`. + +```yml +gzip: + replace_files: true ``` ### Serving pre-compiled gzip files You will likely need to adjust your web server config to serve these precomputed gzip files. See below for common server configurations: