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

- old
+ new

@@ -63,10 +63,12 @@ `Jekyll::Zopfli` 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::Zopfli` will compress all files with the following extensions: - '.html' - '.css' - '.js' @@ -84,9 +86,18 @@ zopfli: extensions: - '.html' - '.css' - '.js +``` + +#### Replacing the original file + +If you host your Jekyll site on AWS S3 you can take advantage of `Jekyll::Zopfli` 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::Zopfli` turn the `replace_files` setting to `true`. + +```yml +zopfli: + 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: