From 23b840449a37c41965e84e6a5af4ab58146caaae Mon Sep 17 00:00:00 2001 From: Timo Montalto Date: Tue, 17 Jun 2025 21:45:58 +0200 Subject: [PATCH] Fix gallery language bug --- layouts/shortcodes/gallery.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html index 81a1755..aea8cb8 100644 --- a/layouts/shortcodes/gallery.html +++ b/layouts/shortcodes/gallery.html @@ -1,10 +1,15 @@ {{ $id := default (printf "gallery-%d" (now.UnixNano)) (.Get "id") }} +{{ $rel := .Page.RelPermalink }} +{{ if hasPrefix $rel "/en" }} + {{ $rel = replace $rel "/en" "" }} +{{ end }}