Files
bobatheme/layouts/_shortcodes/figure.html
2025-07-06 19:45:00 -05:00

18 lines
501 B
HTML

<figure>
{{ with .Get "src" }}
{{ with $.Page.Resources.Get . }}
{{ partial "embed-resource.html" . }}
{{ with .Title }}
<figcaption>{{ . | markdownify }}</figcaption>
{{ end }}
{{ else }}
{{ errorf "resource %q not found" . }}
{{ end }}
{{ else }}
{{ .Inner }}
{{ with .Get "caption" }}
<figcaption>{{ . | markdownify }}</figcaption>
{{ end }}
{{ end }}
</figure>