From fe8b9a8cbe2be67c9995c466130e240725b63f64 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Sun, 6 Feb 2022 21:57:12 +0100 Subject: Update image template functions for zola 0.14.0 The 'resize_image' function was changed to return a map in [1], so we have to update our code accordingly. [1] https://github.com/getzola/zola/commit/7fb99eaa44f387fadf744354c605f0cfcc582800 --- templates/shortcodes/img.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html index b339382..84d549e 100644 --- a/templates/shortcodes/img.html +++ b/templates/shortcodes/img.html @@ -1,7 +1,8 @@ {% set url = page.path ~ path | trim_start_matches(pat="/") -%} +{% set image = resize_image(path=url, width=500, op="fit_width", format=format | default(value="jpg")) -%}
- {{ alt }} + {{ alt }} {% if caption -%}
{{ caption | markdown(inline=true) | safe }}
-- cgit v1.2.3-2-gb3c3