Add <a> tag to image

This commit is contained in:
Dominik V. Salonen 2018-09-03 15:25:51 +00:00
parent 8287d6c190
commit 817a5dcfda
1 changed files with 3 additions and 3 deletions

View File

@ -8,8 +8,8 @@
</time>
</p>
</header>
{{ with .Params.image }}
<img src="{{ . }}" alt="thumbnail" class="c-article__thumbnail">
{{ if .Params.image }}
<a href="{{ .Permalink }}"><img src="{{ .Params.image }}" alt="thumbnail" class="c-article__thumbnail"></a>
{{ end }}
<div class="c-article__summary">
{{ .Summary | plainify | safeHTML }}
@ -17,4 +17,4 @@
{{ if .Truncated }}
<a href="{{ .Permalink }}" class="c-article__btn p-list-article__btn">Read more</a></li>
{{ end }}
</article>
</article>