itsdrike.com/layouts/partials/header_image.html
2022-05-11 14:38:20 +02:00

10 lines
342 B
HTML

{{ 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 }}