-
Notifications
You must be signed in to change notification settings - Fork 0
/
posts.html
40 lines (35 loc) · 1.07 KB
/
posts.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
---
# Feel free to add content and custom Front Matter to this file.
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
title: Posts list
layout: default
mathjax: true
---
<!-- This loops through the paginated posts -->
{% for post in paginator.posts %}
<h3>
<a href="{{ post.url }}">{{ post.title }}</a>
</h3>
{% for tag in post.tags %}
<span class="keyword text-warning">#{{ tag }}</span>
{% endfor %}
<p>
{{ post.excerpt }} <a href="{{ post.url }}">Read more »</a>
</p>
<hr/>
{% endfor %}
<div class="d-flex justify-content-center">
<nav>
<ul class="pagination">
{% if paginator.previous_page %}
<li class="page-item"><a class="page-link" href="{{ paginator.previous_page_path }}">Previous</a></li>
{% endif %}
<li class="page-item">
<a class="page-link">Page: {{ paginator.page }} of {{ paginator.total_pages }}</a>
</li>
{% if paginator.next_page %}
<li class="page-item"><a class="page-link" href="{{ paginator.next_page_path }}">Next</a></li>
{% endif %}
</ul>
</nav>
</div>