fix for relative permalinks causing image not to load
This commit is contained in:
@@ -42,7 +42,12 @@
|
||||
{{ if or (strings.HasPrefix $bgImage "http:") (strings.HasPrefix $bgImage "https:") }}
|
||||
{{ $bgURL = $bgImage }}
|
||||
{{ else }}
|
||||
{{ $bgURL = $bgImage | absURL }}
|
||||
{{ $bgResource := resources.Get $bgImage }}
|
||||
{{ if $bgResource }}
|
||||
{{ $bgURL = $bgResource.RelPermalink }}
|
||||
{{ else }}
|
||||
{{ $bgURL = $bgImage | relURL }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div id="global-background" class="fixed inset-0 overflow-hidden pointer-events-none single_hero_background nozoom" style="z-index: -1;">
|
||||
{{ $style := "" }}
|
||||
|
||||
Reference in New Issue
Block a user