-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
33 lines (30 loc) · 1.02 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
layout: default
description: Home of the site
pagination:
enabled: true
---
<div class="home">
<ul class="post-list">
{%- for post in paginator.posts -%}
{%- include postitem.html post=post -%}
{%- endfor -%}
</ul>
<nav class="pagination">
{%- if paginator.previous_page -%}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" rel="prev">←Newer</a>
{%- endif -%}
{%- for page in (1..paginator.total_pages) -%}
{%- if page == paginator.page -%}
<span>{{ page }}</span>
{%- elsif page == 1 -%}
<a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
{%- else -%}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{%- endif -%}
{%- endfor -%}
{%- if paginator.next_page -%}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" rel="next">Older→</a>
{%- endif -%}
</nav>
</div>