diff --git a/layouts/game/meta.html b/layouts/game/meta.html index 96ae3e2..b80cde9 100644 --- a/layouts/game/meta.html +++ b/layouts/game/meta.html @@ -3,8 +3,8 @@ - - + {{- $fn := printf "/images/game/icons/%s.png" .File.BaseFileName -}}{{- $icon := resources.Get $fn -}} + {{ with $icon }}{{- $thumb := .Fill "48x48 jpg" | resources.Copy (printf "%s.jpg" $fn) -}}{{ end }} {{ range .Params.tags }} diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml index e00db85..957dd81 100644 --- a/layouts/sitemap.xml +++ b/layouts/sitemap.xml @@ -6,13 +6,13 @@ {{ .Permalink }} - {{ if (eq .Section "entry") }} - - {{ .Site.BaseURL }}/images/banners/{{ .Params.Banner | default (print .File.BaseFileName ".png") }} + {{ if (eq .Section "entry") }}{{- $banner_fn := .Params.Banner | default (print .File.BaseFileName ".png") -}} + {{- $fn := printf "/images/banners/%s" $banner_fn -}}{{- $banner := resources.Get $fn -}} + {{ with $banner }}{{- $thumb := .Fit "824x306 jpg" | resources.Copy (printf "%s.jpg" $fn) -}}{{ $thumb.Permalink }}{{ end }} {{ else if (eq .Section "game") }} - - {{ .Site.BaseURL }}/images/game/icons/{{ .File.BaseFileName }}.png + {{- $fn := printf "/images/game/icons/%s.png" .File.BaseFileName -}}{{- $icon := resources.Get $fn -}} + {{ with $icon }}{{- $thumb := .Fill "48x48 jpg" | resources.Copy (printf "%s.jpg" $fn) -}}{{ $thumb.Permalink }}{{ end }} {{ end }}