Skip to content

Commit

Permalink
fix: follow paginate_path config for pagination
Browse files Browse the repository at this point in the history
Using "paginate_path: /page/:num/" to generate "/page/2/" paths would still generate invalid
pagination links to "/page2/"
  • Loading branch information
ZakKemble committed Apr 14, 2022
1 parent 58928db commit 6900d9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/post-paginator.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{% if show %}
<!-- show number -->
<li class="page-item {% if i == paginator.page %} active{% endif %}">
<a class="page-link btn-box-shadow" href="{{ site.baseurl }}/{% if i > 1%}page{{ i }}/{% endif %}">{{ i }}</a>
<a class="page-link btn-box-shadow" href="{% if i > 1 %}{{ site.paginate_path | replace: ':num', i | relative_url }}{% else %}{{ '/' | relative_url }}{% endif %}">{{ i }}</a>
</li>
{% else %}
<!-- hide number -->
Expand Down

0 comments on commit 6900d9f

Please sign in to comment.