-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathblog.html
More file actions
27 lines (26 loc) · 864 Bytes
/
Copy pathblog.html
File metadata and controls
27 lines (26 loc) · 864 Bytes
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
title: blog
permalink: /blog/
---
<h1>Blog</h1>
<p class="tagline">every post since 2007, newest first</p>
{% for post in site.posts %}
{% capture year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% if year != previous_year %}
{% unless forloop.first %}</ul>{% endunless %}
<h2>{{ year }}</h2>
<ul class="post-list">
{% endif %}
<li>
<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%b %-d" }}</time>
{% if post.external_url %}
<a href="{{ post.external_url }}">{{ post.title }} ↗</a>
{% else %}
<a href="{{ post.url }}">{% if post.icon %}{{ post.icon }} {% endif %}{{ post.title }}</a>
{% endif %}
{% if post.category %}<span class="cat">{{ post.category }}</span>{% endif %}
</li>
{% capture previous_year %}{{ year }}{% endcapture %}
{% endfor %}
</ul>