Skip to content

Commit

Permalink
Add archives
Browse files Browse the repository at this point in the history
  • Loading branch information
woliveiras committed Sep 3, 2016
1 parent 9e46c04 commit f5c6476
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions _config.yml
Expand Up @@ -42,6 +42,8 @@ links:
url: /
- title: About Me
url: /about
- title: Archive
url: /archive

# Build settings

Expand Down
19 changes: 19 additions & 0 deletions archive.html
@@ -0,0 +1,19 @@
---
title: Time Machine
layout: page
---

{% for post in site.posts %}

{% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% endif %}
{% endunless %}

<p><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a><small> • {{ post.date | date: site.date_format }}</small></p>
{% endfor %}
1 change: 0 additions & 1 deletion tags.html
@@ -1,7 +1,6 @@
---
layout: page
title: "Tags"
permalink: /tags/index.html
---

<div>
Expand Down

0 comments on commit f5c6476

Please sign in to comment.