Open imydl opened 6 years ago
遇到了同样的问题,请问答主解决了嘛QAQ?跪求解决方案!
Update: 已解决.
将./themes/yilia/layout/_partial/post/category.ejs
改为:
<% if (post.categories && post.categories.length){ %>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<% post.categories.forEach(function(tag, i){ %>
<% if (tag.hasOwnProperty('name')){ %>
<li class="article-tag-list-item">
<a href="<%= config.root %><%= tag.path %>/" class="article-tag-list-link color<%= tag.name.length % 5 + 1 %>">
<%-tag.name%></a>
</li>
<% } %>
<% }) %>
</ul>
</div>
<% } %>
将./themes/yilia/layout/_partial/post/tag.ejs
改为:
<% if (post.tags && post.tags.length){ %>
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<% post.tags.forEach(function(tag, i){ %>
<% if (tag.hasOwnProperty('name')){ %>
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color<%= tag.name.length % 5 + 1 %>">
<%-tag.name%></a>
</li>
<% } %>
<% }) %>
</ul>
</div>
<% } %>
Update at Nov 13, 2021: 感谢 @white-loub 指出错误,已修复qwq
已解决.
好像还是不行哦
@namasikanam 的解决方案的第二个文件修改的地方少了一个 if