-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreviews.vto
26 lines (25 loc) · 811 Bytes
/
reviews.vto
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
---
title: Reviews
description: Years ago, I used to write game reviews as a personal hobby. That website no longer exists but I've archived them to reflect my writing progression over time.
---
{{ layout "core.vto" }}
<main>
<header>
<h1>Reviews</h1>
</header>
<ul>
{{> let seenYears = new Set() }}
{{ for item of search.pages("category=reviews", "date=desc") |> filter(p => !p.draft) }}
{{ if !seenYears.has(item.date.getFullYear()) }}
<h2>{{ item.date.getFullYear() }}</h2>
{{ /if }}
<li>
<a href="{{ item.url }}">{{ item.title }}</a>
{{# TODO: NZ locale #}}
<time datetime="{{ item.date |> date('MMM dd') }}">{{ item.date |> date('MMM dd') }}</time>
</li>
{{> seenYears.add(item.date.getFullYear()) }}
{{ /for }}
</ul>
</main>
{{ /layout }}