From c20e2338a891a2d8dc4cd989c75398078efc4368 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:38:36 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20inconsistent=20picture=20r?= =?UTF-8?q?endering=20when=20using=20Markdown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: #828 --- CHANGELOG.md | 1 + layouts/shortcodes/figure.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a99b911..2092154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Featured images overlap page title when article metadata hidden ([#827](https://github.com/jpanther/congo/issues/827)) +- Inconsistent picture rendering between `figure` shortcode and Markdown render hook ([#828](https://github.com/jpanther/congo/issues/828)) ## [2.8.2] - 2024-04-17 diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 25eca58..7f0e2ee 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -5,7 +5,7 @@ {{ $altText := .Get "alt" }} {{ $caption := .Get "caption" }} {{ $href := .Get "href" }} - {{ $class := .Get "class" }} + {{ $class := default "mx-auto my-0 rounded-md" (.Get "class") }} {{ $file := $url.Path }} {{ $img := .Page.Resources.GetMatch $file }}