featured.html 376 B

12345678910111213
  1. {{ $img := "" }}
  2. {{ with $source := ($.Resources.ByType "image").GetMatch "{*feature*,*cover*,*thumbnail*}" }}
  3. {{ $featured := .Fill (printf "1200x630 %s" (default "Smart" .Params.anchor)) }}
  4. {{ $img = $featured.Permalink }}
  5. {{ else }}
  6. {{ with default $.Site.Params.images $.Params.images }}
  7. {{ $img = index . 0 | absURL }}
  8. {{ end }}
  9. {{ end }}
  10. {{ return $img }}