fix: add alt to image in articles
This commit is contained in:
parent
b95c85c73b
commit
53c41662bd
2 changed files with 2 additions and 5 deletions
|
@ -13,7 +13,7 @@
|
||||||
{{ if $featuredImage }}
|
{{ if $featuredImage }}
|
||||||
{{ $featuredImage = $featuredImage.Resize "600x" }}
|
{{ $featuredImage = $featuredImage.Resize "600x" }}
|
||||||
<figure>
|
<figure>
|
||||||
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
|
<img alt="{{ with .Params.featured_image.alt }}{{ . }}{{ end }}" src="{{ $featuredImage.RelPermalink }}" />
|
||||||
{{ with .Params.featured_image.caption }}
|
{{ with .Params.featured_image.caption }}
|
||||||
<figcaption>{{ . }}</figcaption>
|
<figcaption>{{ . }}</figcaption>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -19,10 +19,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $featuredImage := $featuredImage.Fill "465x348 Center" }}
|
{{ $featuredImage := $featuredImage.Fill "465x348 Center" }}
|
||||||
<figure>
|
<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 }}
|
|
||||||
</figure>
|
</figure>
|
||||||
</a>
|
</a>
|
||||||
<div class="news-item__content">
|
<div class="news-item__content">
|
||||||
|
|
Loading…
Reference in a new issue