Skip to content

Commit cdad87e

Browse files
committed
fix pagination
1 parent f34baa0 commit cdad87e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

source/index.html

+7-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
{% endfor %}
1010
<nav id="pagenavi">
1111
{% if paginator.previous_page %}
12-
<a href="{{paginator.previous_page}}" class="prev">Prev</a>
12+
{% if paginator.previous_page == 1 %}
13+
<a href="{{ root_url }}/" class="prev">Prev</a>
14+
{% else %}
15+
<a href="{{ root_url }}/posts/{{paginator.previous_page}}" class="prev">Prev</a>
16+
{% endif %}
1317
{% endif %}
1418
{% if paginator.next_page %}
15-
<a href="{{paginator.next_page}}" class="next">Next</a>
19+
<a href="{{ root_url }}/posts/{{paginator.next_page}}" class="next">Next</a>
1620
{% endif %}
1721
<div class="center"><a href="{{ root_url }}/blog/archives">Blog Archives</a></div>
18-
</nav>
22+
</nav>

0 commit comments

Comments
 (0)