-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.html
132 lines (113 loc) · 3.47 KB
/
blog.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
layout: page
---
<!-- this is the code for an archive: -->
<div class="posts">
{% for post in site.posts %}
<article class="post">
<h1 class="post-title">
<a href="{% if post.link %}{{ post.link }}{% else %}{{ post.url }}{% endif %}">{{ post.title | smartify }}</a>{% if post.link %}<span class="link-arrow"> →</span>{% endif %}
</h1>
<time datetime="{{ post.date | date_to_xmlschema }}" class="post-date">{{ post.date | date_to_string }}
{% if post %}
{% assign categories = post.categories %}
{% else %}
{% assign categories = page.categories %}
{% endif %}
{% for category in categories %}
in <a href="{{site.baseurl}}/categories/#{{category|slugize}}">{{category}}</a>
{% unless forloop.last %} {% endunless %}
{% endfor %}
</time>
<span class="permalink">
{% if post.link %}
<a href="{{ post.url }}">Permalink</a>
{% endif %}
</span>
{{ post.content | smartify }}
<br>
<div class="tag-list">
{% if post %}
{% assign tags = post.tags %}
{% else %}
{% assign tags = page.tags %}
{% endif %}
{% for tag in tags %}
<a href="{{site.baseurl}}/tags/#{{tag|slugize}}">#{{tag}}</a>
{% unless forloop.last %} {% endunless %}
{% endfor %}
</div>
</article>
{% endfor %}
</div>
<!--
<div class="post">
{% for post in site.posts %}
{% unless post.next %}
<h3><small>{{ post.date | date: '%B %Y' }}</small></h3>
{% else %}
{% capture year %}{{ post.date | date: '%Y %b' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y %b' }}{% endcapture %}
{% if year != nyear %}
<h3><small>{{ post.date | date: '%B %Y' }}</small></h3>
{% endif %}
{% endunless %}
<a href="{{ post.url }}">{{ post.title }}{% if post.link %}<span class="link-arrow"> →</span>{% endif %}</a><br>
{% endfor %}
</div>
-->
<!-- ---
layout: page
title: Home
---
<div class="posts">
{% for post in paginator.posts %}
<article class="post">
<h1 class="post-title">
<a href="{% if post.link %}{{ post.link }}{% else %}{{ post.url }}{% endif %}">{{ post.title | smartify }}</a>{% if post.link %}<span class="link-arrow"> →</span>{% endif %}
</h1>
<time datetime="{{ post.date | date_to_xmlschema }}" class="post-date">{{ post.date | date_to_string }}
{% if post %}
{% assign categories = post.categories %}
{% else %}
{% assign categories = page.categories %}
{% endif %}
{% for category in categories %}
in <a href="{{site.baseurl}}/categories/#{{category|slugize}}">{{category}}</a>
{% unless forloop.last %} {% endunless %}
{% endfor %}
</time>
<span class="permalink">
{% if post.link %}
<a href="{{ post.url }}">Permalink</a>
{% endif %}
</span>
{{ post.content | smartify }}
<br>
<div class="tag-list">
{% if post %}
{% assign tags = post.tags %}
{% else %}
{% assign tags = page.tags %}
{% endif %}
{% for tag in tags %}
<a href="{{site.baseurl}}/tags/#{{tag|slugize}}">#{{tag}}</a>
{% unless forloop.last %} {% endunless %}
{% endfor %}
</div>
</article>
{% endfor %}
</div>
<div class="pagination">
{% if paginator.next_page %}
<a class="pagination-item older" href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older</a>
{% else %}
<span class="pagination-item older">Older</span>
{% endif %}
{% if paginator.previous_page %}
<a class="pagination-item newer" href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Newer</a>
{% else %}
<span class="pagination-item newer">Newer</span>
{% endif %}
</div>
-->