<section class='m_widget categories'>
<div class='header'>Categories</div>
<div class='content'>
    <% if (site.categories.length){ %>
    <ul class="entry">
    <% site.categories.sort('name').each(function(item){ %>
        <li><a class="flat-box" href="<%= url_for(item.path) %>"><div class='name'><%= item.name %></div><div class='badget'><%= item.posts.length %></div></a></li>
    <% }); %>
    </ul>
    <% } %>
</div>
</section>