doc/themes/hugo-geekdoc/layouts/partials/utils/featured.html
Felix Niederwanger 2a9c145b75
Update hugo-geekdoc theme to v0.32.4
Update the used version of hugo-geekdoc to 0.32.4
2022-06-29 10:13:52 +02:00

13 lines
376 B
HTML

{{ $img := "" }}
{{ with $source := ($.Resources.ByType "image").GetMatch "{*feature*,*cover*,*thumbnail*}" }}
{{ $featured := .Fill (printf "1200x630 %s" (default "Smart" .Params.anchor)) }}
{{ $img = $featured.Permalink }}
{{ else }}
{{ with default $.Site.Params.images $.Params.images }}
{{ $img = index . 0 | absURL }}
{{ end }}
{{ end }}
{{ return $img }}