itsdrike.com/layouts/partials/header_image.html

10 lines
342 B
HTML
Raw Normal View History

{{ if .Params.image }}
2022-05-11 12:10:49 +00:00
{{ .Scratch.Set "image" .Params.image }}
{{ if hasPrefix .Params.image "resource:" }}
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
{{ .Scratch.Set "image" ($resource.Resize "2000x").RelPermalink }}
{{ end }}
2022-05-11 12:10:49 +00:00
<img class="mb-3 header-image" src='{{ .Scratch.Get "image" }}' />
{{ end }}