Jekyll and the paginator gemI’ve recently changed my main computer, and this resulted in the need to reinstall a lot of software, including Jekyll to run locally my blog.
However, I was unable to start the usual
bundle exec jekyll servecommand due to a traceback related to missing dependencies. The first fix was to include the
jekyllGem in the
Then I was able to start the local site, but all my posts have disappeared. Or better, they were there in the
_site_directory, but they were not shown at all. I was able to directly render everyon with a specific link, but not to gain access to the list. I noticed that the command was reporting a warning at startup:
% bundle exec jekyll serve Configuration file: /home/luca/git/fluca1978.github.io/_config.yml Deprecation: You appear to have pagination turned on, but you haven't included the `jekyll-paginate` gem. Ensure you have `plugins: [jekyll-paginate]` in your configuration file. Source: /home/luca/git/fluca1978.github.io
The solution was to add the
pluginsline into the
.config.ymlfile, and to install it as a Gem. So, as first step I modified the
Gemfileadding the paginator plugin:
and then I installed using
% bundle install
Then I modified the
.config.ymlfile to include the plugins, please note the name of the paginator that is different from the Gem:
and I was able to start my site again.