-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathposts.html
31 lines (28 loc) · 1 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
---
layout: page
title: "所有文章"
permalink: /category/
---
{% for category in site.categories %}
{% capture cat %}{{ category | first }}{% endcapture %}
<div class="category category-hide" data-cate="{{ cat }}">
<h2>{{ cat | capitalize }}</h2>
{% for desc in site.descriptions %}
{% if desc.cat == cat %}
<p class="desc">{{ desc.desc }}</p>
{% endif %}
{% endfor %}
<ul class="posts-list">
{% for post in site.categories[cat] %}
<li>
<strong>
<a target="_blank" href="/{{ post.url | remove_first: '/' | prepend: site.baseurl }}">{{ post.title }}</a>
</strong>
<span class="post-date">- {{ post.date | date: "%Y年%m月%d日" }}</span>
</li>
{% endfor %}
</ul>
{% if forloop.last == false %}<hr>{% endif %}
</div>
{% endfor %}
<br>