Gemified Theme – Beta Release
Hot on the heels of Jekyll v3.3.0 is a beta release of Minimal Mistakes… as a gemified theme.
minimal-mistakes-jekyll
can only be used with Jekyll proper. If you’re hosting on GitHub Pages or using that gem the theme won’t work. 3rd party themes haven’t been white-listed so it’s a no go for now.
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 _includes
, _layouts
, _sass
partials, or assets
this should be quick and painless.
Step 1: Remove Theme Files
Remove _includes
, _layouts
, _sass
, 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.
Step 2: Update Gemfile
Replace gem "github-pages
or gem "jekyll"
with gem "jekyll", "~> 3.3.0"
. You’ll need the latest version of Jekyll1 for Minimal Mistakes to work and load all of the /assets/ properly.
Add the Minimal Mistakes theme gem:
gem "minimal-mistakes-jekyll"
When finished your Gemfile
should look something like this:
source "https://rubygems.org"
gem "jekyll", "~> 3.3.0"
gem "minimal-mistakes-jekyll"
Step 3: Run Bundler
Run bundle install
(or bundle update
if you’re updating an existing repo) to install/update Jekyll and the theme.
Step 4: Install the Theme
Add theme: "minimal-mistakes-jekyll"
to your _config.yml
file.
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 all applies for image references in _config.yml
and author.yml
as well.
Step 5: jekyll new
Tweaks
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.
_data/ui-text.yml
- UI text documentation_data/navigation.yml
- navigation documentation
You’ll also need to:
- Replace
<site root>/index.html
with a modified Minimal Mistakesindex.html
. - Change
layout: post
in_posts/0000-00-00-welcome-to-jekyll.markdown
tolayout: single
. - Remove
about.md
, or at the very least changelayout: page
tolayout: single
and remove references toicon-github.html
(or copy to your_includes
if using).
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.
Thanks!
-
You could also run
bundle update jekyll
to update Jekyll. ↩