homepage/layouts/shortcodes/figure.html

4 lines
134 B
HTML

<figure>
{{- $img := $.Page.Resources.GetMatch (.Get "src")}}
<img src="{{$img.RelPermalink}}" alt="{{.Get "alt"}}">
</figure>