From 55b399a839d58754b0487a5e20d077a1e8f5d38d Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Wed, 3 Sep 2025 13:53:09 +0700 Subject: fix: use filename (not the whole path) for getting date in lightgallery --- internal/lightgallery/html_renderer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/lightgallery/html_renderer.go b/internal/lightgallery/html_renderer.go index c8c1cf0..8e184e0 100644 --- a/internal/lightgallery/html_renderer.go +++ b/internal/lightgallery/html_renderer.go @@ -60,7 +60,8 @@ func (r *LightGalleryHTMLRenderer) renderLightGallery(w util.BufWriter, source [ for _, img := range gallery.Images { imageUrlSegments := strings.Split(img.URL, ".") imageUrlWithoutExt := strings.Join(imageUrlSegments[:len(imageUrlSegments)-1], ".") - imageNameParts := strings.Split(imageUrlWithoutExt, "-") + imageUrlParts := strings.Split(imageUrlWithoutExt, "/") + imageNameParts := strings.Split(imageUrlParts[len(imageUrlParts)-1], "-") var captionBuf bytes.Buffer captionHTML := img.Caption -- cgit v1.3.1+13