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/"
This commit is contained in:
Zak Kemble 2022-03-27 18:06:23 +01:00
parent 58928dbc90
commit 6900d9f2bc
1 changed files with 1 additions and 1 deletions

View File

@ -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 -->