13 lines
397 B
HTML
13 lines
397 B
HTML
{{- $src := default (.Get 0) (.Get "src") }}
|
|
{{- if not $src }}
|
|
{{- errorf "missing value for 'src': %s" .Position }}
|
|
{{- end }}
|
|
{{- $alt := default (.Get 1) (.Get "alt") }}
|
|
{{- if not $alt }}
|
|
{{- errorf "missing value for 'alt': %s" .Position }}
|
|
{{- end }}
|
|
{{- $img := resources.Get $src | resources.Fingerprint }}
|
|
<p>
|
|
<img class="centered" src="{{ $img.RelPermalink }}" alt="{{ $alt }}">
|
|
</p>
|