|
1 | 1 | {% include base_path %}
|
| 2 | +{% capture posts_path %}{{ base_path }}/{{ include.posts_path }}{% endcapture %} |
2 | 3 |
|
3 | 4 | {% if paginator.total_pages > 1 %}
|
4 | 5 | <nav class="pagination">
|
5 | 6 | <ul>
|
6 | 7 | {% comment %} Link for previous page {% endcomment %}
|
7 | 8 | {% if paginator.previous_page %}
|
8 | 9 | {% if paginator.previous_page == 1 %}
|
9 |
| - <li><a href="{{ base_path }}/">{{ site.data.ui-text[site.locale].pagination_previous }}</a></li> |
| 10 | + <li><a href="{{ posts_path }}/">{{ site.data.ui-text[site.locale].pagination_previous }}</a></li> |
10 | 11 | {% else %}
|
11 |
| - <li><a href="{{ base_path }}/page{{ paginator.previous_page }}/">{{ site.data.ui-text[site.locale].pagination_previous }}</a></li> |
| 12 | + <li><a href="{{ posts_path }}/page{{ paginator.previous_page }}/">{{ site.data.ui-text[site.locale].pagination_previous }}</a></li> |
12 | 13 | {% endif %}
|
13 | 14 | {% else %}
|
14 | 15 | <li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous }}</span></a></li>
|
|
18 | 19 | {% if paginator.page == 1 %}
|
19 | 20 | <li><a href="#" class="disabled current">1</a></li>
|
20 | 21 | {% else %}
|
21 |
| - <li><a href="{{ base_path }}/">1</a></li> |
| 22 | + <li><a href="{{ posts_path }}/">1</a></li> |
22 | 23 | {% endif %}
|
23 | 24 |
|
24 | 25 | {% assign page_start = 2 %}
|
|
36 | 37 |
|
37 | 38 | {% for index in (page_start..page_end) %}
|
38 | 39 | {% if index == paginator.page %}
|
39 |
| - <li><a href="{{ base_path }}/page{{ index }}/" class="disabled current">{{ index }}</a></li> |
| 40 | + <li><a href="{{ posts_path }}/page{{ index }}/" class="disabled current">{{ index }}</a></li> |
40 | 41 | {% else %}
|
41 | 42 | {% comment %} Distance from current page and this link {% endcomment %}
|
42 | 43 | {% assign dist = paginator.page | minus: index %}
|
43 | 44 | {% if dist < 0 %}
|
44 | 45 | {% comment %} Distance must be a positive value {% endcomment %}
|
45 | 46 | {% assign dist = 0 | minus: dist %}
|
46 | 47 | {% endif %}
|
47 |
| - <li><a href="{{ base_path }}/page{{ index }}/">{{ index }}</a></li> |
| 48 | + <li><a href="{{ posts_path }}/page{{ index }}/">{{ index }}</a></li> |
48 | 49 | {% endif %}
|
49 | 50 | {% endfor %}
|
50 | 51 |
|
|
56 | 57 | {% if paginator.page == paginator.total_pages %}
|
57 | 58 | <li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
|
58 | 59 | {% else %}
|
59 |
| - <li><a href="{{ base_path }}/page{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li> |
| 60 | + <li><a href="{{ posts_path }}/page{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li> |
60 | 61 | {% endif %}
|
61 | 62 |
|
62 | 63 | {% comment %} Link next page {% endcomment %}
|
63 | 64 | {% if paginator.next_page %}
|
64 |
| - <li><a href="{{ base_path }}/page{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next }}</a></li> |
| 65 | + <li><a href="{{ posts_path }}/page{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next }}</a></li> |
65 | 66 | {% else %}
|
66 | 67 | <li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next }}</span></a></li>
|
67 | 68 | {% endif %}
|
|
0 commit comments