-
Notifications
You must be signed in to change notification settings - Fork 2
/
archive.html
37 lines (36 loc) · 941 Bytes
/
archive.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
---
layout: default
title: Archives
---
{%for post in site.posts %}
{% assign m = post.date | date: "%-m" %}
{% unless post.next %}
<h1>{{ post.date | date: '%Y' }}</h1>
<ul>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
</ul>
<h1>{{ post.date | date: '%Y' }}</h1>
<ul>
{% endif %}
{% endunless %}
<li><a href="{{ site.baseurl}}{{ post.url }}">{{ post.date | date: " %-d" }}
{% case m %}
{% when '1' %}Jan.
{% when '2' %}Fév.
{% when '3' %}Mars
{% when '4' %}Avr.
{% when '5' %}Mai
{% when '6' %}Juin
{% when '7' %}Juil.
{% when '8' %}Août
{% when '9' %}Sept.
{% when '10' %}Oct.
{% when '11' %}Nov.
{% when '12' %}Déc.
{% endcase %}
- {{ post.title }}</a></li>
{% endfor %}
</ul>