Skip to content

Commit fd48ce4

Browse files
committed
feat: 首页文章列表显示作者,后台可控制
1 parent 392693b commit fd48ce4

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

settings.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ spec:
3333
name: top_search
3434
label: 开启搜索功能
3535
value: true
36+
- $formkit: checkbox
37+
name: post_author
38+
id: post_author
39+
label: 首页文章列表显示作者
40+
value: true
3641
- $formkit: select
3742
name: post_list_style
3843
id: post_list_style

templates/macro/content-thumb.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@
2626
<div class="post-content-wrap">
2727
<div class="post-date flex-child-center">
2828
<span class="iconify" data-icon="solar:clock-circle-linear"></span>
29+
<span th:if="${theme.config.general.post_author}">
30+
<a
31+
data-pjax
32+
th:href="${post.owner.permalink}"
33+
th:text="${post.owner.displayName}"
34+
aria-label="viewing the author the article belongs to"
35+
>
36+
</a>
37+
</span>
2938
<time
3039
class="publish-time"
3140
data-i18n="postlist.time"

0 commit comments

Comments
 (0)