-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.html
More file actions
37 lines (31 loc) · 1010 Bytes
/
archive.html
File metadata and controls
37 lines (31 loc) · 1010 Bytes
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
---
layout: default
title: 归档
permalink: /archive/
---
<h2>搜索</h2>
<!--若使用algolia,则保留如下代码
<div id="search-searchbar"></div>
<div class="post-list" id="search-hits">
</div>
{% include algolia.html %}
若若使用algolia,则保留如上代码-->
<!--本主题默认使用本地搜索;若不使用本地搜索,请删除以下代码-->
<!-- HTML elements for search -->
{% include search.html %}
<!--若不使用本地搜索,请删除以上上代码-->
<h2>归档</h2>
<ul>
{% for post in site.posts %}
{% unless post.next %}
<h2>{{ post.date | date: '%Y年' }}</h2>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h2>{{ post.date | date: '%Y年' }}</h2>
{% endif %}
{% endunless %}
<h5>{{ post.date | date:"%m月%d日" }} <a href="{{ post.url }}">{{ post.title }}</a></h5>
{% endfor %}
</ul>