summaryrefslogtreecommitdiff
path: root/src/_layouts/archive.html
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2021-02-05 09:55:25 +0100
committerPatrick Spek <p.spek@tyil.nl>2021-04-01 07:26:50 +0200
commitc455896ae9e69e2498742ff795e7886dee1ffa23 (patch)
tree62a7353cbd1b14b4dd93b453f1f38cfe533c66ec /src/_layouts/archive.html
parent32acfbf6bf21d52e987d1b7599128f75b759ab28 (diff)
Move source files into src
Diffstat (limited to 'src/_layouts/archive.html')
-rw-r--r--src/_layouts/archive.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/_layouts/archive.html b/src/_layouts/archive.html
new file mode 100644
index 0000000..c794c22
--- /dev/null
+++ b/src/_layouts/archive.html
@@ -0,0 +1,39 @@
+---
+layout: default
+---
+
+{% markdown %}
+## Blog posts tagged with #{{ page.title | slugify }}
+{% endmarkdown %}
+
+{% include posts-intro.md %}
+
+{% for post in page.posts %}
+ {% if post.wip %}{% continue %}{% endif %}
+ {% assign this_year = post.date | date: "%Y" %}
+
+ {% if this_year != prev_year %}
+ {% if forloop.first != true %}
+ </ul>
+ {% endif %}
+
+ <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>
+ {% endif %}
+
+ {% assign prev_year = post.date | date: "%Y" %}
+{% endfor %}