File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 8
8
< h1 class ="page-heading "> Posts</ h1 >
9
9
10
10
< ul class ="post-list ">
11
- {% for post in site .posts %}
11
+ {% for post in paginator .posts %}
12
12
< li >
13
13
< span class ="post-meta "> {{ post.date | date: "%b %-d, %Y" }}</ span >
14
14
19
19
{% endfor %}
20
20
</ ul >
21
21
22
+ <!-- Pagination links -->
23
+ < div class ="pagination ">
24
+ {% if paginator.previous_page %}
25
+ < a href ="{{ paginator.previous_page_path }} " class ="previous "> Previous</ a >
26
+ {% else %}
27
+ < span class ="previous "> Previous</ span >
28
+ {% endif %}
29
+ < span class ="page_number "> Page: {{ paginator.page }} of {{ paginator.total_pages }}</ span >
30
+ {% if paginator.next_page %}
31
+ < a href ="{{ paginator.next_page_path }} " class ="next "> Next</ a >
32
+ {% else %}
33
+ < span class ="next "> Next</ span >
34
+ {% endif %}
35
+ </ div >
36
+
22
37
< p class ="rss-subscribe "> subscribe < a href ="{{ "/feed.xml" | prepend: site.baseurl }}"> via RSS</ a > </ p >
23
38
24
39
</ div >
You can’t perform that action at this time.
0 commit comments