fix: add alt to image in articles
All checks were successful
Deploy workflow / deploy (push) Successful in 29s

This commit is contained in:
Matthieu Bessat 2024-03-31 17:55:04 +02:00
parent 54c21c047d
commit ae2accd6db
2 changed files with 2 additions and 5 deletions

View file

@ -13,7 +13,7 @@
{{ if $featuredImage }}
{{ $featuredImage = $featuredImage.Resize "600x" }}
<figure>
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
<img alt="{{ with .Params.featured_image.alt }}{{ . }}{{ end }}" src="{{ $featuredImage.RelPermalink }}" />
{{ with .Params.featured_image.caption }}
<figcaption>{{ . }}</figcaption>
{{ end }}

View file

@ -19,10 +19,7 @@
{{ end }}
{{ $featuredImage := $featuredImage.Fill "465x348 Center" }}
<figure>
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
{{ with .Params.featured_image.caption }}
<figcaption>{{ . }}</figcaption>
{{ end }}
<img alt="{{ with .Params.featured_image.alt }}{{ . }}{{ end }}" src="{{ $featuredImage.RelPermalink }}" />
</figure>
</a>
<div class="news-item__content">