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 }}