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

View File

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