-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
executable file
·67 lines (57 loc) · 2.06 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
layout: default
---
<ul id="posts">
{% for post in paginator.posts %}
{% if post.tags contains 'DO_NOT_SHOW_IN_POSTS' or post.tags contains 'ARCHIVE' %}
{% else %}
<li class="post">
<h2>
<a href="{% if site.baseurl == "/" %}{{ post.url }}{% else %}{{ post.url | prepend: site.baseurl }}{% endif %}">
{{ post.title }}
</a>
</h2>
<time datetime="{{ post.date | date_to_xmlschema }}" class="by-line">
{{ post.date | date_to_string }}
{% if post.tags != empty %}
• {{ post.tags | join: ", " }}
{% endif %}
</time>
<p>
{{ post.content | strip_html | truncatewords:50 }}
</p>
</li>
{% endif %}
{% endfor %}
<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">«</a>
{% elsif paginator.previous_page%}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">«</a>
{% else %}
<span class="page-item">«</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="page-item">{{ page }}</span>
{% elsif page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}" class="page-item">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">»</a>
{% else %}
<span class="page-item">»</span>
{% endif %}
{% for page in site.pages %}
{% if page.title == 'Archive' %}
<a href="{{ page.url }}" class="page-item">{{ page.title }}</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
</ul>