{{ $imgPath := delimit (slice "static" (.Destination | safeURL) ) "/"}} {{ if fileExists $imgPath }} {{ $img := imageConfig $imgPath }} {{ .Text }}
Fig. {{ substr (strings.TrimSuffix (path.Ext .Destination) .Destination) -1 }} - {{ .Text }}.
{{ else }} {{ errorf "Specified file at %s not found." $imgPath }} {{ end }}