17 lines
379 B
HTML
17 lines
379 B
HTML
{{- $path := .path -}}
|
|
{{- $caption := .caption -}}
|
|
{{- $alt := default .caption .alt -}}
|
|
|
|
{{ if $path }}
|
|
<figure class="image">
|
|
<img
|
|
src="{{- $path | absURL -}}"
|
|
{{ with $caption }}title="{{- . -}}"{{ end }}
|
|
{{ with $alt }}alt="{{- . -}}"{{ end }}
|
|
/>
|
|
{{ with $caption }}
|
|
<figcaption>{{ . }}</figcaption>
|
|
{{ end }}
|
|
</figure>
|
|
{{ end }}
|