From 5913b5f7330dd725e12a982d79ed72c219291435 Mon Sep 17 00:00:00 2001 From: madrilene Date: Fri, 28 Mar 2025 11:41:34 +0100 Subject: [PATCH] fall back to empty alt text instead of repeating title --- src/_layouts/post.njk | 2 +- .../2025/2025-01-09-post-with-image/post-with-image.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/_layouts/post.njk b/src/_layouts/post.njk index a9306b0..2728a20 100644 --- a/src/_layouts/post.njk +++ b/src/_layouts/post.njk @@ -9,7 +9,7 @@ schema: BlogPosting {% if image %} - {% image image, alt or title, credit, "eager", "feature" %} + {% image image, alt or "", credit, "eager", "feature" %} {% endif %}

diff --git a/src/posts/2025/2025-01-09-post-with-image/post-with-image.md b/src/posts/2025/2025-01-09-post-with-image/post-with-image.md index d60bf2b..78a8271 100644 --- a/src/posts/2025/2025-01-09-post-with-image/post-with-image.md +++ b/src/posts/2025/2025-01-09-post-with-image/post-with-image.md @@ -108,10 +108,10 @@ As for the higher build cost of post-processing, the shortcode images are being {% raw %} ```jinja2 -{% image image, alt or title, credit, "eager", "feature", "grayscale" %} +{% image image, alt or "", credit, "eager", "feature", "grayscale" %}

- {{ alt or title }} + {{ alt or '' }} {% if credit %}
{{ credit }}
{% endif %} @@ -121,10 +121,10 @@ As for the higher build cost of post-processing, the shortcode images are being {% endraw %} -{% image image, alt or title, credit, "eager", "feature", "grayscale" %} +{% image image, alt or "", credit, "eager", "feature", "grayscale" %}
- {{ alt or title }} + {{ alt or '' }} {% if credit %}
{{ credit }}
{% endif %}