Jekyll-paginate-v2 only showing two posts per page


I have jekyll-paginate-v2 *almost" working. It paginates just fine, but it’s only paginating two posts at a time. Here’s my YAML config for it:

paginate: nil
paginate_path: nil

  enabled: true
  per_page: 5
  permalink: '/page/:num/'
  title: ':title - page :num of :max'
  sort_field: 'date'
  sort_reverse: true

As you can see, it’s set for 5, but only two posts per page shows up. Here’s the index.html:

<div class="home">
  <h1 class="page-heading">Posts</h1>
  {% for post in paginator.posts %}
  <h2><a href="{{ post.url }}">{{ post.title }}</a> - <span class="date">{{ | date_to_string }}</span></h2>
{% endfor %}

  {% if paginator.total_pages > 1 %}
  <ul class="pager">
    {% if paginator.previous_page %}
    <li class="previous">
      <a href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Newer</a>
    {% endif %}
    {% if paginator.next_page %}
    <li class="next">
      <a href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older</a>
    {% endif %}
  {% endif %}

  <p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>


Is there something I’m doing wrong?

Sorry. After hours and hours, I just fixed it.

I had to remove the following from _config.yaml:

paginate: nil
paginate_path: nil

I had never done that before because all the documentation and examples had it and stressed the importance of disabling jekyll-paginate.

Posting this reply in case someone else encounters this problem.