add image captions

This commit is contained in:
Tobias Pfandzelter 2020-08-05 21:52:27 +02:00
parent 41db6a77dc
commit 73ad44e2ca
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,9 @@
{{ if .Title }}
<figure>
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
<figcaption>{{ .Title }}</figcaption>
</figure>
{{ else }}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
{{ end }}