blog: Use page resources for header image

This commit is contained in:
jtbx 2023-11-30 21:53:46 +01:00
parent 63d29bb1e2
commit 8fce40f91d

View file

@ -38,6 +38,9 @@
{{- end }}
{{- end }}
</div>
{{ if isset .Params "header" }} <img class="container" src="{{ .Params.header.image }}" alt="{{ .Params.header.caption }}" /> {{ end }}
{{- if isset .Params "header" }}
{{- $img := .Resources.GetMatch .Params.header.image }}
<img class="container" src="{{ $img.RelPermalink }}" alt="{{ .Params.header.caption }}" />
{{- end }}
</header>
{{- end }}