This repository has been archived on 2022-11-21. You can view files and clone it, but cannot push or open issues or pull requests.
kspace-static/src-hexo/blog/themes/landscape/layout/_widget/recent_posts.ejs
2020-03-08 22:29:13 +01:00

14 lines
No EOL
399 B
Text

<% if (site.posts.length){ %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('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>
</div>
<% } %>