]> danix's work - danix2-hugo-theme.git/commitdiff
fix: use .InnerDeindent in figure shortcode
authorDanilo M. <redacted>
Sun, 5 Apr 2026 07:37:34 +0000 (09:37 +0200)
committerDanilo M. <redacted>
Sun, 5 Apr 2026 07:37:34 +0000 (09:37 +0200)
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 <redacted>
layouts/shortcodes/figure.html

index 81f86de95939781843f0b54761a92882e3bef36c..4cf2e7b87642706019d0328d6710215f5481c531 100644 (file)
@@ -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>