diff options
| author | 2025-09-03 13:53:09 +0700 | |
|---|---|---|
| committer | 2025-09-03 13:53:09 +0700 | |
| commit | 55b399a839d58754b0487a5e20d077a1e8f5d38d (patch) | |
| tree | 6d14635e121c407fa5bdecedfac3f500d3cf9f24 | |
| parent | 6af14241ff2c8050753f1d6ac702a938a017a839 (diff) | |
| download | web-55b399a839d58754b0487a5e20d077a1e8f5d38d.tar.gz web-55b399a839d58754b0487a5e20d077a1e8f5d38d.zip | |
fix: use filename (not the whole path) for getting date in lightgallery
| -rw-r--r-- | internal/lightgallery/html_renderer.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 |