Use first_page_path from Paginate V2 if available (#2431)

This commit is contained in:
iBug ♦ 2020-03-17 09:17:53 +08:00 committed by GitHub
parent eeecf26117
commit 4e25e5242e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
{% if paginator.total_pages > 1 %}
<nav class="pagination">
{% assign first_page_path = site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | relative_url %}
{% assign first_page_path = paginator.first_page_path | default: site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | relative_url %}
<ul>
{% comment %} Link for previous page {% endcomment %}
{% if paginator.previous_page %}