Skip to content

Commit 6900d9f

Browse files
committed
fix: follow paginate_path config for pagination
Using "paginate_path: /page/:num/" to generate "/page/2/" paths would still generate invalid pagination links to "/page2/"
1 parent 58928db commit 6900d9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_includes/post-paginator.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
{% if show %}
4848
<!-- show number -->
4949
<li class="page-item {% if i == paginator.page %} active{% endif %}">
50-
<a class="page-link btn-box-shadow" href="{{ site.baseurl }}/{% if i > 1%}page{{ i }}/{% endif %}">{{ i }}</a>
50+
<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>
5151
</li>
5252
{% else %}
5353
<!-- hide number -->

0 commit comments

Comments
 (0)