Add optional 'class' attribute to image shortcode

This commit is contained in:
Luca 2020-12-01 16:48:16 +01:00
parent 41d1444b3a
commit e79e038b51
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<figure>
<img src="{{ .Get "src" }}" alt="{{ .Get "alt" }}">
<img{{ with .Get "class" }} class="{{ . }}"{{ end }} src="{{ .Get "src" }}" alt="{{ .Get "alt" }}">
<figcaption>{{ .Get "alt" }}</figcaption>
</figure>