Compress Jekyll website with jekyll-press

To compress your output files (from the _site folder), you can use jekyll-press.

It’s very easy to install, configure and enable.

Install g++

Install build-essential and g++:

sudo apt-get install build-essential g++

Install the bundler gem

sudo gem install bundler

Install jekyll-press

In the root folder of your Jekyll instance, create a file Gemfile, and add this:

source ''

gem 'jekyll'
gem 'execjs'
gem 'therubyracer'
gem 'jekyll-press'

Then execute:

$ bundle

Enable jekyll-press

Create the following plugin in your project’s _plugins directory.

# _plugins/bundler.rb
require "rubygems"
require "bundler/setup"

This will automatically require all of the gems specified in your Gemfile.

Configure jekyll-press

In your _congif.yml file, add this block:

  exclude: 'atom.xml' # Exclude files from processing - file name, glob pattern or array of file names and glob patterns
  js_options: {}      # js minifier options
  css_options: {}     # css minifier options
  html_options: {}    # html minifier options


Next time you rebuild your website, the output files will be compressed.

No tips yet.
Be the first to tip!

Like this post? Tip me with bitcoin!


If you enjoyed reading this post, please consider tipping me using Bitcoin. Each post gets its own unique Bitcoin address so by tipping you're not only making my continued efforts possible but telling me what you liked.

Leave a Reply

Your email address will not be published. Required fields are marked *