fix(widgets): fix hero image path when canonifyurls=true

This commit is contained in:
George Cushen committed 2018-11-05 21:16:29 +00:00
1 parent eb5c91f8f1
commit c084f016ae
1 file changed
+2 -2
+2 -2
View File
@@ -5,7 +5,7 @@
{{/* 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 }}
{{ $overlay_img = (printf "img/%s" $header.overlay_img) }}
{{end}}
<section id="{{ $page.File.TranslationBaseName }}" class="hero-overlay" style="
@@ -15,7 +15,7 @@ background-color: {{ $header.overlay_color | default "transparent" }};
{{ if $header.overlay_img }}
background-image:
{{ if $header.overlay_filter }}linear-gradient(rgba(0, 0, 0, {{ $header.overlay_filter }}), rgba(0, 0, 0, {{ $header.overlay_filter }})), {{ end }}
url('{{ $overlay_img }}');
url('{{ $overlay_img }}')
{{ end }}
;">