Can't get pagination to work with Jekyll in /archive/ directory

723 Views Asked by At

I've gone through the previous questions about Jekyll and pagination and none of the suggestions are working. I have this:

_config.yml
gems:
  - jekyll-paginate
paginate: 5 # amount of posts to show
paginate_path: archive/page:num/

archive.html
---
 layout: archive
 permalink: /archive/
 author_profile: true
---
{% include base_path %}

<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts }}</h3>

{% for post in paginator.posts %}
  {% include archive-single.html %}
{% endfor %}

{% include paginator.html %}

This ends up with a very nicely formatted archive page in /archive/ with zero posts. My posts do have permalinks, I don't know if that's the problem. The subdirectories are being created correctly but the archive page just doesn't find them.

Note that if I put it in index.html that works great, but I want to have a splash page at the front with a link to an archive page for posts, which seems possible but just doesn't work.

Please don't call this a duplicate. I've read the other 10 posts on the same thing, and for some reason it's just not working.

This is Jekyll 3.1.6

1

There are 1 best solutions below

1
On

Switched to jeckyll-archives which solved the issue.