We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f602de1 commit d78bb45Copy full SHA for d78bb45
templates/index.html
@@ -39,7 +39,8 @@ <h2 class="h2 article-title">最新文章</h2>
39
40
<div class="blog-content">
41
<div class="blog-meta">
42
- <p class="blog-category" th:text="${post.categories[0].spec.displayName}"></p>
+ <p class="blog-category"
43
+ th:text="${#lists.isEmpty(post.categories) ? '未分类' : post.categories[0].spec.displayName}"></p>
44
<span class="dot"></span>
45
<time datetime="2022-02-23" th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}"></time>
46
</div>
0 commit comments