forked from zhgeaits/zhgeaits.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
27 lines (26 loc) · 821 Bytes
/
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
---
layout: default
---
<div id="home">
<ul class="posts">
{% assign lastYear = 'null' %}
{% assign lastMonth = 'null' %}
{% for post in site.posts %}
{% assign year = post.date | date: "%Y" %}
{% assign month = post.date | date: "%B" %}
{% if year != lastYear %}
<h2 id="year">{{ year }}</h2>
<h2 id="month">{{ month }}</h2>
<li><span>{{ post.date | date: "%d" }}</span> » <a href="{{ post.url }}">{{ post.title }}</a></li>
{% assign lastMonth = month %}
{% assign lastYear = year %}
{% else %}
{% if month != lastMonth %}
<h2 id="month">{{ month }}</h2>
{% assign lastMonth = month %}
{% endif %}
<li><span>{{ post.date | date: "%d" }}</span> » <a href="{{ post.url }}">{{ post.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>