/
index.html
70 lines (60 loc) · 1.68 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
68
69
70
---
layout: default
title: Home
---
<div class="posts">
<h2 class="sr-only">Blog posts index page {{ paginator.page }}</h1>
{% for post in paginator.posts %}
<article class="post">
<h2 class="post-title">
<a href="{{ post.url }}">
{{ post.title }}
</a>
</h2>
<time
datetime="{{ post.date | date: "%Y-%m-%d" }}"
class="post-date">
{{ post.date | date_to_string: "ordinal" }}
</time>
{{ post.excerpt }}
<a
href="{{ post.url }}"
class="read-more"
aria-label="Read full post about '{{ post.title }}'"
>Read more...</a>
</article>
{% endfor %}
</div>
<div class="pagination">
{% if paginator.next_page %}
<a class="pagination-item older" rel=“prev” href="{{ "/" | relative_url }}page{{paginator.next_page}}/">Older</a>
{% else %}
<span class="pagination-item older">Older</span>
{% endif %}
{% if paginator.previous_page %}
<a
class="pagination-item newer"
href="{{ "/" | relative_url }}{% if paginator.page != 2 %}page{{paginator.previous_page}}/{% endif %}"
rel=“next”
>Newer</a>
{% else %}
<span class="pagination-item newer">Newer</span>
{% endif %}
</div>
{% if paginator contains "page" and paginator.page == 1 %}
{% assign tags = site.pages | map: "tag" | compact %}
{% if tags %}
<div>
<h2>Browse posts by tags</h2>
<p>
The posts touch a lot of different topics in no particular order.
It might be more convenient to browse by tags if you have a topic of specific interest.
</p>
</div>
<ul>
{% for tag in tags %}
<li><a href="/tags/{{ tag | downcase }}/">#{{ tag | downcase }}</a>
{% endfor %}
</ul>
{% endif %}
{% endif %}