aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/_default
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/single.html7
1 files changed, 3 insertions, 4 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index d12dd07..6538e4f 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -8,12 +8,11 @@
<h3 class="f3 baskerville mv3">{{ . }}</h3>
{{end}}
- {{ if isset .Params "image" }}
- {{ $image := resources.Get .Params.image }}
- {{ $image := $image.Fill (default "400x400" .Params.image_size) }}
+ {{ with resources.Get (index .Params.images 0) | default (resources.Get .Params.image) }}
+ {{ $image := .Fill (default "400x400" $.Params.image_size) }}
<div class="relative">
<img src="{{ $image.RelPermalink }}" class="db center" alt= "{{ .Title }}">
- {{ with .Params.caption }}
+ {{ with $.Params.caption }}
<a href="{{ .url }}" class="link near-white absolute bottom-0 right-0 pa2 bg-black-30 br2">
{{ .text }}
</a>