diff --git a/layouts/partials/widgets/hero.html b/layouts/partials/widgets/hero.html index 70aacf76..078e7953 100644 --- a/layouts/partials/widgets/hero.html +++ b/layouts/partials/widgets/hero.html @@ -2,6 +2,12 @@ {{ $page := .page }} {{ $header := $page.Params.header }} +{{/* Compute image path outside of HTML style element due to Hugo limitation. */}} +{{ $overlay_img := "" }} +{{ if $header.overlay_img }} + {{ $overlay_img = (printf "img/%s" $header.overlay_img) | relURL }} +{{end}} +