fix: tag and category are not display when empty in home page

This commit is contained in:
XPoet 2020-09-12 17:14:21 +08:00
parent d48e164bf2
commit c90ea6bd5b
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@
<div class="article-date"> <div class="article-date">
<span><i class="fa fa-pencil-square-o"></i> <%= date(post.date, 'YYYY-MM-DD') %></span> <span><i class="fa fa-pencil-square-o"></i> <%= date(post.date, 'YYYY-MM-DD') %></span>
<% if (theme.magic.enable === true) { %> <% if (theme.magic.enable === true) { %>
<% if (theme.home_article.category.enable === true) { %> <% if (post.categories.length && theme.home_article.category.enable === true) { %>
<span> <span>
<i class="fa fa-folder"></i> <i class="fa fa-folder"></i>
<ul> <ul>
@ -38,7 +38,7 @@
</ul> </ul>
</span> </span>
<% } %> <% } %>
<% if (theme.home_article.tag.enable === true) { %> <% if (post.tags.length && theme.home_article.tag.enable === true) { %>
<span> <span>
<i class="fa fa-tags"></i> <i class="fa fa-tags"></i>
<ul> <ul>