mirror of https://github.com/IoTcat/blog.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
399 B
14 lines
399 B
4 years ago
|
<% 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>
|
||
|
<% } %>
|