hexo/themes/Klise/layout/partials/recent-posts.ejs

13 lines
481 B
Plaintext

<% if (page.posts.length > 0) { %>
<h3 class="posts-item-note" aria-label="Recent Posts">Recent Posts</h3>
<% page.posts.sort('date', -1).limit(10).each(post => { %>
<article class="post-item">
<span class="post-item-date" datetime="<%=post.date.toJSON()%>"><%- date(post.date, 'MMM DD, YYYY') %></span>
<h4 class="post-item-title">
<a href="<%=url_for(post.path)%>"><%=post.title%></a>
</h4>
</article>
<% }); %>
<% } %>