Jekyll themes distributed as Ruby gems are finally here to make installing and upgrading much easier. Gone are the days of forking a repo just to “install it”. Or dealing with merge conflicts when pulling in upstream commits to “upgrade it”.
If you’re interested in testing out Minimal Mistakes as a gemified theme read on. There are a few caveats though:
assetsfolder was recently added to Jekyll core, but has yet to be released or rolled into the
github-pagesgem. Meaning you can’t use Minimal Mistakes as a Ruby gem there just yet… locally served or self-hosted installs should be fine if you don’t mind using a pre-release version of Jekyll.
Fine with all that? Great. Let’s continue.
If you’re migrating a site already using Minimal Mistakes and haven’t customized any of the
_sass partials, or
assets this should be quick and painless.
assets folders and files within. You won’t need these anymore as they’re bundled in the theme.
If you customized any of these then leave them alone and only remove the untouched ones. If setup correctly your modified versions should act as overrides to the versions bundled with the theme.
In order to test you’ll need to install pre-release gems of Jekyll and Minimal Mistakes.
Start by replacing
gem "github-pages" or
gem "jekyll" with the following:
gem "jekyll", :git => "https://github.com/jekyll/jekyll.git"
Then add the pre-release Minimal Mistakes theme gem:
gem "minimal-mistakes-jekyll", :git => "https://github.com/mmistakes/minimal-mistakes.git", :branch => "feature/theme-gem"`
When finished your
Gemfile should look something like this:
source "https://rubygems.org" gem "jekyll", :git => "https://github.com/jekyll/jekyll.git" gem "minimal-mistakes-jekyll", :git => "https://github.com/mmistakes/minimal-mistakes.git", :branch => "feature/theme-gem" group :jekyll_plugins do # gem "jekyll-archives" gem "jekyll-paginate" gem "jekyll-sitemap" gem "jekyll-gist" gem "jekyll-feed" end
bundle install (or
bundle update if you’re updating an existing repo) to install the pre-release gems.
theme: "minimal-mistakes-jekyll" to your
If you’re migrating from an existing Minimal Mistakes site you shouldn’t have to change anything else after this. If it’s a new site consult then docs to properly config.
Please Note: Paths for image headers, overlays, teasers, galleries, and feature rows have changed and now require a full path. Instead of just
image: filename.jpg you’ll need to use the full path eg:
image: assets/images/filename.jpg. The preferred location is now
assets/images but can be placed elsewhere or external hosted. This applies for image references in
If this is a new site be sure to add the following files to
_data/ and customize as you see fit. There is currently no way of bundling them in with the theme, so be sure to consult the docs on how to properly use both.
You’ll also need to:
<site root>/index.htmlwith a modified Minimal Mistakes
about.md, or at the very least change
layout: singleand remove references to
icon-github.html(or copy to your
That’s it! If all goes well running
bundle exec jekyll serve should spin-up your site. If you encounter any bumps please file an issue on GitHub and make sure to indicate you’re testing the pre-release Ruby gem version.