I upgraded to Jekyll 3.2.1 recently and got a strange error message when I ran jekyll build
:
After some searching, I came across an open issue related to this on Github.
The issue seems to be caused by a change in 3.2 that now reserves the config key theme
to specify a gem-based theme for Jekyll. This means that you can’t use the key theme
in your config.yml
file to specify config settings for your jekyll theme. This was a standard practice for a lot of older Jekyll themes, so I expect this to be a somewhat common problem.
For example, in my config.yml
file, I had the following:
The fix is to change the theme
key to something else. I chose template
. You not only have to change this in your config.yml
file, but you also have to change anywhere that accesses it in your template files. The string you are looking for here is site.theme.*
and is usually in your includes and layout files (look for folders called _includes
and _layouts
).
I changed that section of my config.yml
to this:
Then I did a global search for site.theme.
and replaced it with site.template.