24 lines
483 B
Plaintext
24 lines
483 B
Plaintext
```
|
|
metadata.layout = "default.html.ejs"
|
|
metadata.title = "Archive"
|
|
```
|
|
|
|
<div class="main">
|
|
<% let currentYear %>
|
|
<% for (const post of posts) { %>
|
|
<% if (post.metadata.date.getFullYear() !== currentYear) { %>
|
|
<% if (currentYear) { %>
|
|
</ul>
|
|
<% } %>
|
|
<% currentYear = post.metadata.date.getFullYear() %>
|
|
<h2><%= currentYear %></h2>
|
|
<ul>
|
|
<% } %>
|
|
<li>
|
|
<a href="<%= post.metadata.permalink %>">
|
|
<%= post.metadata.title %>
|
|
</a>
|
|
</li>
|
|
<% } %>
|
|
</div>
|