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:
parent
5de2c29a29
commit
d44096143e
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .Params.Image }}
|
{{ if .Params.Image }}
|
||||||
<figure style="margin: 0">
|
<figure style="margin: 0">
|
||||||
<img src="{{ .Params.Image }}" alt="" />
|
<img src="{{ .Params.Image }}" alt="{{ .Params.Alt }}" />
|
||||||
{{ if .Params.ImageCaption }}
|
{{ if .Params.ImageCaption }}
|
||||||
<figcaption>
|
<figcaption>
|
||||||
<p>{{ .Params.ImageCaption | markdownify }}</p>
|
<p>{{ .Params.ImageCaption | markdownify }}</p>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue