use image alt wherever possible
This commit is contained in:
parent
bcff415581
commit
3706ace5e8
4 changed files with 9 additions and 7 deletions
|
|
@ -18,9 +18,9 @@
|
|||
{{ if .Params.Image }}
|
||||
<a class="unstyledLink" href="{{ .Permalink }}">
|
||||
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
|
||||
<img src="{{ .Params.Image }}" />
|
||||
<img src="{{ .Params.Image }}" alt="{{ .Params.Alt }}" />
|
||||
{{ else }}
|
||||
<img src="/{{ path.Join .File.Dir .Params.Image }}" />
|
||||
<img src="/{{ path.Join .File.Dir .Params.Image }}" alt="{{ .Params.Alt }}" />
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue