-
Notifications
You must be signed in to change notification settings - Fork 346
/
categories.html
43 lines (40 loc) · 927 Bytes
/
categories.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
---
layout: page
title: 分类
---
{% if site.posts.size == 0 %}
<h2>No post found</h2>
{% endif %}
<div class="tags">
<ul class="label">
{% for tag in site.categories %}
<li>
<a href="#{{ tag[0] }}">
<span>{{ tag[0] }}</span>
<span class="count">{{ tag[1] | size }}</span>
</a>
</li>
{% endfor %}
</ul>
{% for tag in site.categories %}
<h2 id="{{ tag[0] }}">
{{ tag[0] }}
</h2>
<ul class="tag">
{% for post in tag[1] %}
{% if post.title != null %}
<li>
<time>{{ post.date | date: "%Y-%m-%d" }}</time>
{% if post.link %}
<a href="{{ post.link }}">
{% else %}
<a href="{{ site.baseurl }}{{ post.url }}">
{% endif %}
{{ post.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>