website/layouts/_markup/render-image.html
2026-01-13 07:40:34 +01:00

15 lines
391 B
HTML

{{- if .IsBlock -}}
<figure>
<img
src="{{ .Destination | safeURL }}"
{{- with .PlainText }}alt="{{ . }}"{{ end -}}
/>
{{- with .Title }}<figcaption>{{ . }}</figcaption>{{ end -}}
</figure>
{{- else -}}
<img
src="{{ .Destination | safeURL }}"
{{- with .PlainText }}alt="{{ . }}"{{ end -}}
{{- with .Title }}title="{{ . }}"{{ end -}}
/>
{{- end -}}