-
Notifications
You must be signed in to change notification settings - Fork 1
/
blog.en.html
51 lines (47 loc) · 1.27 KB
/
blog.en.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
title: Blog
lang: en
permalink: /blog/
pagination:
enabled: true
locale: en_US
---
<h1>Latest posts</h1>
{% for post in paginator.posts %}
<article>
<header>
<h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
</header>
<p>
<time datetime="{{ post.date | date_to_xmlschema }}">
{{ post.date | date_to_long_string: "ordinal" }}
</time>
</p>
<p>{{ post.seo_description | truncatewords: 20 }}</p>
</article>
{% endfor %}
{% if paginator.total_pages > 1 %}
<center>
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | relative_url }}">« Prev</a>
{% else %}
<span>« Prev</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<em>{{ page }}</em>
{% elsif page == 1 %}
<a href="/blog">{{ page }}</a>
{% else %}
<a href="{{ site.pagination.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | relative_url }}">Next »</a>
{% else %}
<span>Next »</span>
{% endif %}
</div>
<center/>
{% endif %}