From 6d78fb87927f09802cd7f2f0b24a927ec5e6ef77 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sun, 1 Sep 2024 15:27:41 +0200 Subject: [PATCH] Use alt text as image title, if no title was provided This shows the alt text on hover, if the browser supports it. And should also display it on long press on mobile. --- layouts/_default/_markup/render-image.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 layouts/_default/_markup/render-image.html diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html new file mode 100644 index 0000000..b0ec8aa --- /dev/null +++ b/layouts/_default/_markup/render-image.html @@ -0,0 +1,5 @@ +{{ $title := (or .Title .Text) }} +{{ . }} -- 2.38.5