<% let currentYear = null; %> <% for (const item of items) { %> <% const itemYear = item["pub-status"] === "Preprint" ? "Preprints" : item["pub-year"]; if (itemYear && itemYear !== currentYear) { currentYear = itemYear; %>

<%= currentYear %>

<% } %>

<% if (item.pdf) { %> <%= item.title %> <% } else { %> <%= item.title %> <% } %>

<% if (item["pub-authors"] && item["pub-authors"].length) { %>
<%= item["pub-authors"].length === 1 ? item["pub-authors"][0] : item["pub-authors"].length === 2 ? item["pub-authors"].join(" & ") : item["pub-authors"].slice(0, -1).join(", ") + ", & " + item["pub-authors"].slice(-1) %>
<% } %>
<% if (item["pub-year"]) { %> <%- item["pub-year"] %> <% } %> <% if (item.venue) { %> <%- item.venue %> <% } %> <% if (item["pub-type"]) { %> <%- item["pub-type"] %> <% } %>
<% } %>