From 83297c83e4d5ae0512bb846798eed660e8f09ee7 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Mon, 16 Feb 2026 18:30:10 +0100 Subject: [PATCH] fix relative path specifier for photoswipe import (fix #545) --- src/sigal/themes/colorbox/templates/album.html | 2 +- src/sigal/themes/photoswipe/templates/album_items.html | 2 +- src/sigal/utils.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sigal/themes/colorbox/templates/album.html b/src/sigal/themes/colorbox/templates/album.html index 61d91da..037abcf 100644 --- a/src/sigal/themes/colorbox/templates/album.html +++ b/src/sigal/themes/colorbox/templates/album.html @@ -41,7 +41,7 @@ - {{ media.url }} diff --git a/src/sigal/themes/photoswipe/templates/album_items.html b/src/sigal/themes/photoswipe/templates/album_items.html index 1803a88..f17c89c 100644 --- a/src/sigal/themes/photoswipe/templates/album_items.html +++ b/src/sigal/themes/photoswipe/templates/album_items.html @@ -19,7 +19,7 @@ data-pswp-height="600" {% endif %} > - {{ media.url }} + {{ media.title }}
{{ img_description(media, with_big=False) }} diff --git a/src/sigal/utils.py b/src/sigal/utils.py index 4879e75..93f2b71 100644 --- a/src/sigal/utils.py +++ b/src/sigal/utils.py @@ -82,6 +82,8 @@ def url_from_path(path): if os.sep != "/": path = "/".join(path.split(os.sep)) + if path[0] != ".": + path = f"./{path}" return quote(path)