Allow custom hero images Fixes #379 (#670)

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
Alexandre Neto 2022-10-15 18:18:50 +01:00 committed by GitHub
parent c52b1f8dcc
commit 32c5c04632
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@
{{/* if hero image is specified in the page front-matter, then use that */}}
{{ if .Params.hero }}
{{ $heroImage = .Page.Resources.GetMatch .Params.hero }}
{{ $heroImage = resources.Get .Params.hero }}
{{ end }}
{{ .Scratch.Set "heroScratch" $heroImage }}