feat: custom time format

This commit is contained in:
Erzbir
2025-11-18 00:13:03 +08:00
parent 11ebd6f2bb
commit 641427aec8
4 changed files with 51 additions and 8 deletions
+2 -1
View File
@@ -20,7 +20,8 @@
</h1>
<div class="post-meta">
<time class="post-date"
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">Publish Time</time>
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.style.time_style == 'custom' ?
theme.config.style.custom_time_style : theme.config.style.time_style}__')}">Publish Time</time>
<span class="post-author"
th:with="contributor = ${post.contributors[0]}"
th:text="${contributor.displayName}">Author</span>