diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-05 09:37:34 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-05 09:37:34 +0200 |
| commit | fcf2f6f50ce06e9d2e8e49b7a3c1095169a43076 (patch) | |
| tree | 16342399afc04f7e65bef2d172344dec99b55b5e /layouts/shortcodes/figure.html | |
| parent | 043ec4b61363fe28b2d2d8ac9e17e9386bf7175d (diff) | |
| download | danixxyz-theme-fcf2f6f50ce06e9d2e8e49b7a3c1095169a43076.tar.gz danixxyz-theme-fcf2f6f50ce06e9d2e8e49b7a3c1095169a43076.zip | |
fix: use .InnerDeindent in figure shortcode
Changed from .Inner to .InnerDeindent to properly evaluate and dedent inner content when a closing tag is provided.
This fixes the Hugo error: 'shortcode "figure" does not evaluate .Inner or .InnerDeindent'
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'layouts/shortcodes/figure.html')
| -rw-r--r-- | layouts/shortcodes/figure.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 81f86de..4cf2e7b 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -7,7 +7,7 @@ {{- if .Get "link" -}} <a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}> {{- end -}} - {{- .Inner -}} + {{.InnerDeindent}} {{- if .Get "link" }}</a>{{ end -}} {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} <figcaption> |
