Add single post image alt text, if present.

The current template does not allow for an alt text to the single layout. This small change adds the alt text if present in the page front matter.
This commit is contained in:
Olof Nord 2022-10-09 21:40:22 +02:00
parent 5de2c29a29
commit d44096143e
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@
{{ end }}
{{ if .Params.Image }}
<figure style="margin: 0">
<img src="{{ .Params.Image }}" alt="" />
<img src="{{ .Params.Image }}" alt="{{ .Params.Alt }}" />
{{ if .Params.ImageCaption }}
<figcaption>
<p>{{ .Params.ImageCaption | markdownify }}</p>