aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/_default/single.html
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2023-09-07 02:37:36 +0200
committerOscar Najera <hi@oscarnajera.com>2023-09-07 02:37:36 +0200
commit5e20b8d99cd4591cc9d066370139d210d673864c (patch)
treea17021b68f31b3d5ccb488e057dc7aa7942ce518 /layouts/_default/single.html
parentcd710363419f5144062707e8cd170278052924fa (diff)
downloadhugo-minimalist-theme-5e20b8d99cd4591cc9d066370139d210d673864c.tar.gz
hugo-minimalist-theme-5e20b8d99cd4591cc9d066370139d210d673864c.tar.bz2
hugo-minimalist-theme-5e20b8d99cd4591cc9d066370139d210d673864c.zip
metadata for social media
I must here also change how the page image is stored
Diffstat (limited to 'layouts/_default/single.html')
-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>