✨ Support Hugo Markdown Attributes for Inline Images

This commit is contained in:
Phillip Whittlesea-Clark committed 2025-11-01 18:21:42 +00:00
1 parent d0db9190d4
commit 65ad575c9c
7 files changed
+111 -4

No files matched your search

+6 -1
View File
@@ -82,7 +82,12 @@
{{- end -}}
<figure>
<figure
{{- range $k, $v := .Attributes -}}
{{- if $v -}}
{{- printf " %s=%q" $k ($v | transform.HTMLEscape) | safeHTMLAttr -}}
{{- end -}}
{{- end -}}>
{{- if $isRemote -}}
{{- template "RenderImageSimple" (dict "imgObj" "" "src" $urlStr "alt" $altText) -}}
{{- else if $resource -}}