From 4cbce336b810ef905c41261707536d2b83605d71 Mon Sep 17 00:00:00 2001 From: paspo Date: Sun, 7 Jul 2024 08:16:16 +0200 Subject: [PATCH] fix featured image --- layouts/_default/single.html | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 layouts/_default/single.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..76ac78e --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,31 @@ +{{ define "main" }} +
+

{{ .Title }}

+

{{ .Description }}

+ {{ if .Site.Params.show_post_dates | default true }} + {{- with .Date }}{{ end }} + {{ end }} + {{ partial "tags.html" . }} +
+ + {{- if or .Params.image }} + + {{- $featimg := "#" -}} + + {{- if .Params.image -}} + {{/* se è stata definita un'immagine featured */}} + {{- $img := .Page.Resources.GetMatch .Params.image -}} + {{- $featimg = $img.RelPermalink -}} + {{- end -}} + + {{- if .Params.featured -}} + {{/* se è stata definita un'immagine featured */}} + {{- $img := .Page.Resources.GetMatch .Params.featured -}} + {{- $featimg = $img.RelPermalink -}} + {{- end -}} + + {{ .Params.image_alt }} + {{ end }} + + {{- .Content }} +{{ end }}