fix: categories

This commit is contained in:
shenyu
2020-05-28 23:13:00 +08:00
parent 86cd94fc80
commit c0ef5fc0ad
3 changed files with 41 additions and 42 deletions

View File

@@ -1,17 +1,8 @@
<section class="outer">
<% if (site.categories.length){ %>
<h1 class="page-type-title"><%= __('categories') %></h1>
<!-- <%- list_categories({show_count: theme.show_count}) %> -->
<ul class="category-list">
<% site.categories.map(function(item){ %>
<% if(item.posts.length){ %>
<a class="category-list-link" href="<%- config.root %><%- item.path %>" title="<%= item.name %>">
<li class="category-list-item">
<%= item.name %><i><%= item.posts.length %></i>
</li>
</a>
<% } %>
<% }); %>
</ul>
<div class="categories-box">
<%- list_categories() %>
</div>
<% } %>
</section>