Last active
August 29, 2015 14:19
-
-
Save Phlow/ae38580f834d00dba64a to your computer and use it in GitHub Desktop.
#Jekyll Archivseite nach Jahren sortiert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
* | |
* List Archive by Year | |
* | |
{% endcomment %} | |
<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:"%d %b" }}</time><a href="{{ post.url }}">{{ post.title }}</a></li> | |
{% endfor %} | |
</ul> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment