From e44515ea7f908d61204b0912e9a0d2d3d93ee594 Mon Sep 17 00:00:00 2001 From: FarseaSH Date: Sat, 28 Sep 2024 18:44:30 +0800 Subject: [PATCH] IMPROVEMENT: Trim the caption length to the first 100 characters --- layouts/partials/pic_set.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/pic_set.html b/layouts/partials/pic_set.html index 52620e5..b855f56 100644 --- a/layouts/partials/pic_set.html +++ b/layouts/partials/pic_set.html @@ -8,6 +8,9 @@ {{ $max_width = 53}} {{ end }} +{{/* Trim the caption length to the first 100 characters */}} +{{ $caption = $caption | truncate 100 "..." }} +
{{ range $num, $a := $pic_set }}