This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
spdocker/themes/spd/layout/_widget/recent-posts.ejs

12 lines
321 B
Plaintext
Raw Permalink Normal View History

2018-03-07 04:58:54 +00:00
<% if (site.posts.length){ %>
<h5><%= __('RECENT POSTS') %></h3>
<div class="widget">
<ul>
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
<li>
<a href="<%- url_for(post.path) %>"><%= post.title || '(no title)' %></a>
</li>
<% }) %>
</ul>
</div>
<% } %>