<% if (site.posts.length){ %>
  <div class="card card-info">
    <div class="card-header"><%= __('recent_posts') %></div>
    <div class="card-menu">
        <% site.posts.sort('date', -1).limit(5).each(function(post){ %>
            <a class="menu-element" href="<%- url_for(post.path) %>">
              <span class="trim-that"><%= post.title || '(no title)' %></span>
            </a>
        <% }) %>
    </div>
  </div>
<% } %>
