Converting a Jekyll Gem-Based Theme to a Regular Theme
Note that if you convert a gem-based Jekyll theme to a regular theme that lives in your website's directory, you won't receive theme updates.
To convert your theme:
- Find the location of the gem directory. In a terminal or command line window, enter
bundle info --path minima
(replaceminima
with the actual name of the theme). - Copy all the folders from the gem's directory into your Jekyll site directory; no need to copy over the
LICENSE.txt
orREADME.md
files. - Find the runtime dependency plugins used by the theme:
- The plugins will be in the theme's
.gemspec
file, which should be in thespecifications
folder of your Ruby installation directory (e.g.,/usr/lib/ruby/gems/3.0.0/specifications/minima-2.5.1.gemspec
). - The plugins you're looking for will should look something like the following:
- The plugins will be in the theme's
s.add_runtime_dependency(%q<jekyll-feed>.freeze, ["~> 0.9"])
s.add_dependency(%q<jekyll-seo-tag>.freeze, ["~> 2.1"])
- In your Jekyll website folder, open the
Gemfile
. In thegroup :jekyll_plugins do
section, add references to the runtime plugins like so:
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
gem "jekyll-seo-tag", "~> 2.7"
end
**Note:** If one or more of the plugins are already listed in the `Gemfile`, just leave them in place.
- In the terminal, enter
bundle update
. - In your Jekyll site, remove the reference to the theme gem:
- Open the
Gemfile
and removegem "minima", "~> 2.5"
. - Open
_config.yml
and removetheme: minima
.
- Open the