From 4b2192f2fa89f10d09fabc48105465865ef01943 Mon Sep 17 00:00:00 2001 From: Track3 Date: Mon, 31 Dec 2018 20:03:32 +0800 Subject: Use `images` instead of `featuredImg` `featuredImg` and `bgImg` are preserved in case you want to use a different background image from metadata images --- layouts/posts/single.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'layouts/posts/single.html') diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 224995e..026a626 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -3,9 +3,13 @@ {{ end }} {{ define "main" }} - {{- with .Params.featuredImg }} + {{- if .Params.featuredImg }} +
+ {{- else if .Params.images }} + {{- range first 1 .Params.images }}
{{- end }} + {{- end }}
@@ -51,7 +55,7 @@ {{- end }}
- {{ partial "comments.html" . }} + {{- partial "comments.html" . -}}
{{ end }} -- cgit v1.2.3