summaryrefslogtreecommitdiff
path: root/_pages/posts.html
blob: 98b61b582c8bcfa6f16546107aad2aa227d887e2 (plain)
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
38
39
40
41
42
43
44
45
---
layout: default
permalink: /posts/
title: Blog posts
description: >
  I occasionally write blogposts about things I find interesting. These are
  usually programming, security or privacy related.
---

{% markdown %}
## Blog posts
{% endmarkdown %}

{% include posts-intro.md %}

{% for post in site.posts %}
	{% if post.wip %}{% continue %}{% endif %}
	{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
	{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}

	{% if forloop.first %}
		<h3>{{ this_year }}</h3>
		<ul>
	{% endif %}

	<li>
		<a href="{{ post.url }}">{{ post.title }}</a>
		<small>
			{{ post.date | date: "%Y-%m-%d" }}
			{% for tag in post.tags %}
			<a href="{{ site.baseurl | prepend: site.url }}/tag/{{ tag | slugify }}">#{{ tag | slugify}}</a>
			{% endfor %}
		</small>
	</li>

	{% if forloop.last %}
		</ul>
	{% else %}
		{% if this_year != next_year %}
			</ul>
			<h3>{{ next_year }}</h3>
			<ul>
		{% endif %}
	{% endif %}
{% endfor %}