I'm running 3.1.2 on Windows
When I try to add 'Paginate' to my project, I'm getting an error in cmd
Deprecation: You appear to have pagination turned on, but you haven't included the
jekyll-paginate
gem. Ensure you havegems: [jekyll-paginate]
in your configuration file.
I have jekyll-paginate (1.1.0)
and paginate (4.0.0)
installed and it's still giving this error.
Here is my _config.yml file:
paginate: 4
paginate_path: '/blog/page:num/'
And my index.html page
{% for post in paginator.posts limit: 4 %}
What should I check, to resolve this?
Jekyll guys have removed Paginate plugin from version 3.x as it did not play nicely with more core features. You can still enable it using any of these three options
_plugins
directory. Place your plugins here. Any file ending in *.rb inside this directory will be loaded before Jekyll generates your site._config.yml
file, add a new array with the key gems and the values of the gem names of the plugins you’d like to use. An example:
gems: [jekyll-coffeescript, jekyll-watch, jekyll-assets]
# This will require each of these gems automatically.
Then install your plugins using gem install jekyll-paginate-category jekyll-watch jekyll-assets
group :jekyll_plugins do
gem "my-jekyll-plugin"
gem "jekyll-paginate-category"
end
Now you need to install all plugins from your Bundler group by running single command bundle install
You can find more information on jekyll plugins page
Make sure you have the following in your _config.yml
file.
gems: [jekyll-paginate]
Maybe the issue is that you have 2 versions of Jekyll, one installed through "apt" and another thru "gem". Try to remove the one installed with "apt" (or whatever command you're using) and update the other version using the bundler "bundle update". I have this error I've corrected by removing Jekyll I installed by "apt" command. ** Notes: I'm using Ubuntu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With