|
1 | 1 | {% if paginator.total_pages > 1 %}
|
2 | 2 | <nav class="pagination">
|
3 |
| - {% assign first_page_path = site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | absolute_url %} |
| 3 | + {% assign first_page_path = site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | relative_url %} |
4 | 4 | <ul>
|
5 | 5 | {% comment %} Link for previous page {% endcomment %}
|
6 | 6 | {% if paginator.previous_page %}
|
7 | 7 | {% if paginator.previous_page == 1 %}
|
8 | 8 | <li><a href="{{ first_page_path }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
|
9 | 9 | {% else %}
|
10 |
| - <li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li> |
| 10 | + <li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | relative_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li> |
11 | 11 | {% endif %}
|
12 | 12 | {% else %}
|
13 | 13 | <li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
|
|
35 | 35 |
|
36 | 36 | {% for index in (page_start..page_end) %}
|
37 | 37 | {% if index == paginator.page %}
|
38 |
| - <li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | absolute_url }}" class="disabled current">{{ index }}</a></li> |
| 38 | + <li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | relative_url }}" class="disabled current">{{ index }}</a></li> |
39 | 39 | {% else %}
|
40 | 40 | {% comment %} Distance from current page and this link {% endcomment %}
|
41 | 41 | {% assign dist = paginator.page | minus: index %}
|
42 | 42 | {% if dist < 0 %}
|
43 | 43 | {% comment %} Distance must be a positive value {% endcomment %}
|
44 | 44 | {% assign dist = 0 | minus: dist %}
|
45 | 45 | {% endif %}
|
46 |
| - <li><a href="{{ site.paginate_path | replace: ':num', index | absolute_url }}">{{ index }}</a></li> |
| 46 | + <li><a href="{{ site.paginate_path | replace: ':num', index | relative_url }}">{{ index }}</a></li> |
47 | 47 | {% endif %}
|
48 | 48 | {% endfor %}
|
49 | 49 |
|
|
55 | 55 | {% if paginator.page == paginator.total_pages %}
|
56 | 56 | <li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
|
57 | 57 | {% else %}
|
58 |
| - <li><a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | replace: '//', '/' | absolute_url }}">{{ paginator.total_pages }}</a></li> |
| 58 | + <li><a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | replace: '//', '/' | relative_url }}">{{ paginator.total_pages }}</a></li> |
59 | 59 | {% endif %}
|
60 | 60 |
|
61 | 61 | {% comment %} Link next page {% endcomment %}
|
62 | 62 | {% if paginator.next_page %}
|
63 |
| - <li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li> |
| 63 | + <li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | relative_url }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li> |
64 | 64 | {% else %}
|
65 | 65 | <li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
|
66 | 66 | {% endif %}
|
|
0 commit comments