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:
enabled: true
collection: 'posts'
permalink: '/page/:num/'
category: 'posts'
per_page: 3
sort_reverse: true
sort_field: 'date'
title: 'Blog'
limit: 0
tag: ''
trail:
before: 2
after: 2
extension: html
plugins:
- jekyll-sitemap
- jekyll-paginate-v2
- jekyll-redirect-from
index.html
---
layout: default
pagination:
enabled: true
collection: posts
---
<div class="container">
<div class="row">
<div class="col-lg-12 mt-4">
<div class="row">
{% for post in paginator.posts %}
<div class="col-lg-4 my-5 post indexposts">
<img class="post-img img-fluid" title="{{post.title}}" alt="{{post.title}}" src="{{site.url}}/assets/img/posts/{{ post.slug }}/thumbnail.png">
<div class="post-body">
<div class="post-meta">
<a class="post-category tag" href="#">{{post.tags}}</a>
<span class="post-date"><time datetime="{{ post.date | date_to_xmlschema }}" itemprop="datePublished">{{ post.date | date: "%b %-d, %Y" }}</time></span>
</div>
<h3 class="post-title"><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h3>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
Here is the link to my site.
I would really appreciate any help. Thanks in advance!