From c90ea6bd5beb2367eadcb186bf9c492a480eae86 Mon Sep 17 00:00:00 2001 From: XPoet Date: Sat, 12 Sep 2020 17:14:21 +0800 Subject: [PATCH] fix: tag and category are not display when empty in home page --- layout/home-content.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/home-content.ejs b/layout/home-content.ejs index 18255ab..2563289 100644 --- a/layout/home-content.ejs +++ b/layout/home-content.ejs @@ -24,7 +24,7 @@
<%= date(post.date, 'YYYY-MM-DD') %> <% if (theme.magic.enable === true) { %> - <% if (theme.home_article.category.enable === true) { %> + <% if (post.categories.length && theme.home_article.category.enable === true) { %>
    @@ -38,7 +38,7 @@
<% } %> - <% if (theme.home_article.tag.enable === true) { %> + <% if (post.tags.length && theme.home_article.tag.enable === true) { %>