From 01285fe6b24c1a012025067bd09a2af54fccda2b Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Sat, 9 Apr 2022 14:36:00 +0200 Subject: templates: Allow setting custom links in the 'img' shortcode Up until now we always linked to the image itself, but in the future we may want to link to any arbitrary (even external) page. Add a 'link' argument to the 'img' shortcode to facilitate this. If no link is given, we fall back to linking to the image; this makes sure that older posts need not be changed. --- templates/shortcodes/img.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html index 1b960c4..320ac84 100644 --- a/templates/shortcodes/img.html +++ b/templates/shortcodes/img.html @@ -5,7 +5,7 @@ {% else -%}
{% endif -%} - + {{ alt }} {% if caption -%} -- cgit v1.2.3-2-gb3c3