adding archive page
This commit is contained in:
parent
cee54da1fc
commit
46cd81c700
1 changed files with 22 additions and 0 deletions
22
archive.html
Normal file
22
archive.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<section id="archive">
|
||||
<h3>This year's posts</h3>
|
||||
{%for post in site.posts %}
|
||||
{% unless post.next %}
|
||||
<ul class="this">
|
||||
{% else %}
|
||||
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
|
||||
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
|
||||
{% if year != nyear %}
|
||||
</ul>
|
||||
<h3>{{ post.date | date: '%Y' }}</h3>
|
||||
<ul class="past">
|
||||
{% endif %}
|
||||
{% endunless %}
|
||||
<li><time>{{ post.date | date:"%b %d" }}</time> - <a href="{{ post.url }}">{{ post.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
Loading…
Reference in a new issue