itsdrike.com/layouts/partials/header_image.html

10 lines
358 B
HTML
Raw Normal View History

{{ if .Params.image }}
{{ .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 }}
<img class="mb-3 header-image" src='{{ .Scratch.Get "image" }}' />
{{ end }}