summaryrefslogtreecommitdiff
path: root/layouts/_partials
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-07-19 20:44:22 +0800
committerEltrac <hi@guhub.cn>2025-07-19 20:44:22 +0800
commit7b8e9b98a89dafed41f7c55424286da33edfb371 (patch)
tree3569d4b45e181d2fe93c5013d1f9d3b0fe0cc6b3 /layouts/_partials
parentd982e354272f10d8f9f24a9697308afb6463b5ec (diff)
feat: add short description to post items
Former-commit-id: c185f5cd837f451ec85b34b09ccdccebe88734e0
Diffstat (limited to 'layouts/_partials')
-rw-r--r--layouts/_partials/items/post.html12
1 files changed, 8 insertions, 4 deletions
diff --git a/layouts/_partials/items/post.html b/layouts/_partials/items/post.html
index 1adf86af..2bf6a157 100644
--- a/layouts/_partials/items/post.html
+++ b/layouts/_partials/items/post.html
@@ -33,10 +33,14 @@
</div>
{{ end }}
</header>
- {{ if $showSummary }}
- <div class="markdown-body text-size-lg!"
- style="view-transition-name: post-content-{{ .File.UniqueID }}">
+ {{ if or $showSummary .ctx.Params.description }}
+ <div class="markdown-body text-size-lg!"
+ style="view-transition-name: post-content-{{ .File.UniqueID }}">
+ {{ if $showSummary }}
{{ .ctx.Summary }}
- </div>
+ {{ else if .ctx.Params.description }}
+ {{ .ctx.Params.description }}
+ {{ end }}
+ </div>
{{ end }}
</div>