Yikes! It looks like you don’t have jekyll-paginate-v2 or one of its dependencies installed. In order to use Jekyll as currently configured, you’ll need to install this gem. If you’ve run Jekyll with bundle exec, ensure that you have included the jekyll-paginate-v2 gem in your Gemfile as well. The full error message from Ruby is: ‘Unable to activate jekyll-paginate-v2-2.0.0, because jekyll-4.0.0 conflicts with jekyll (~> 3.0)’ If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
Next/previous links on a post is something different I believe. It’s not part of the paginator object, which is used when you have a “list of posts”… not a single post. Instead of paginator.previous and paginator.next you use page.previous and page.next.
Something like this would go on your single post layout to page between the post before and after the current one:
{% if page.previous or page.next %}
<nav class="pagination">
{% if page.previous %}
<a href="{{ page.previous.url | relative_url }}">Previous</a>
{% endif %}
{% if page.next %}
<a href="{{ page.next.url | relative_url }}">Next</a>
{% endif %}
</nav>
{% endif %}
Hey!
I am facing this weird issue with Jekyll-paginate-v2.
The paginator.posts is working locally but when i update the site on github repo. It doesn’t work on both index.html & blog.html (Inside _pages Folder)
Here are the files,
_config.yml
#Pagination Settings
pagination:
enabled: true # The default document collection to paginate if nothing is specified ('posts' is default)
debug: false # Set to 'true' to enable pagination debugging. This can be enabled in the site config or only for individual pagination pages
collection: 'posts'
permalink: '/page/:num/' # The permalink structure for the paginated pages (this can be any level deep)
category: 'posts' # Optional, the default category to use, omit or just leave this as 'posts' to get a backwards-compatible behavior (all posts)
per_page: 3 # How many objects per paginated page, used to be `paginate` (default: 0, means all)
sort_reverse: true # Optional, sorts the posts in reverse order (omit to default decending or sort_reverse: true)
sort_field: 'date' # Optional, defines the field that the posts should be sorted on (omit to default to 'date')
title: 'Blog' # Optional the title format for the paginated pages (supports :title for original page title, :num for pagination page number, :max for total number of pages)
limit: 0 # Limit how many pagenated pages to create (default: 0, means all)
tag: '' # Optional, the default tag to use, omit to disable
# Optional,omit or set both before and after to zero to disable.
# Controls how the pagination trail for the paginated pages look like.
trail:
before: 2
after: 2
# Optional, the default file extension for generated pages (e.g html, json, xml).
# Internally this is set to html by default
extension: html
plugins:
- jekyll-sitemap
- jekyll-paginate-v2
- jekyll-redirect-from