feat: add option for whether archives page displays tag

This commit is contained in:
Erzbir
2025-11-18 00:24:55 +08:00
parent 641427aec8
commit b2af6489d3
2 changed files with 13 additions and 8 deletions
+5
View File
@@ -28,6 +28,11 @@ spec:
- group: page - group: page
label: 页面配置 label: 页面配置
formSchema: formSchema:
- $formkit: checkbox
name: archives_tags
label: 归档页显示文章标签
value: false
- $formkit: text - $formkit: text
name: archives_title name: archives_title
label: 归档页标题自定义 label: 归档页标题自定义
+8 -8
View File
@@ -27,15 +27,15 @@
<a data-pjax th:href="@{${post.status.permalink}}"> <a data-pjax th:href="@{${post.status.permalink}}">
<span class="post-list-title" th:text="${post.spec.title}">Post Title</span> <span class="post-list-title" th:text="${post.spec.title}">Post Title</span>
</a> </a>
<span class="post-tags"> <span class="post-tags" th:if="${theme.config.page.archives_tags}">
<span class="post-tag" th:each="tag : ${post.tags}"> <span class="post-tag" th:each="tag : ${post.tags}">
<a data-pjax <a data-pjax
th:href="@{${tag.status.permalink}}" th:href="@{${tag.status.permalink}}"
th:title="${tag.spec.displayName}" th:title="${tag.spec.displayName}"
th:text="'#'+${tag.spec.displayName}" th:text="'#'+${tag.spec.displayName}"
>#Tag</a> >#Tag</a>
</span> </span>
</span> </span>
</div> </div>
</li> </li>