Add permalink to a featured images on the home page (#261)

Co-authored-by: Dillon <dillonzq@outlook.com>
This commit is contained in:
Dmitry Kireev 2020-04-26 17:15:47 +02:00 committed by GitHub
parent 19c7da333d
commit c4741cfecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,8 +3,10 @@
{{- /* Featured image */ -}}
{{- with $params.featuredimage -}}
<div class="featured-image-preview">
{{- $image := $params.featuredimagepreview | default . -}}
{{- partial "plugin/image.html" (dict "src" $image "alt" $.Description "large" true) -}}
<a href="{{ $.RelPermalink }}">
{{- $image := $params.featuredimagepreview | default . -}}
{{- partial "plugin/image.html" (dict "src" $image "alt" $.Description "large" true) -}}
</a>
</div>
{{- end -}}