diff options
| author | Eltrac <hi@guhub.cn> | 2025-07-19 20:44:22 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-07-19 20:44:22 +0800 |
| commit | 7b8e9b98a89dafed41f7c55424286da33edfb371 (patch) | |
| tree | 3569d4b45e181d2fe93c5013d1f9d3b0fe0cc6b3 /layouts/_partials/items | |
| parent | d982e354272f10d8f9f24a9697308afb6463b5ec (diff) | |
feat: add short description to post items
Former-commit-id: c185f5cd837f451ec85b34b09ccdccebe88734e0
Diffstat (limited to 'layouts/_partials/items')
| -rw-r--r-- | layouts/_partials/items/post.html | 12 |
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> |
