[fix] add slash before $featured_image in page-header.html to show the image correctly

This commit is contained in:
gcnyin 2020-12-20 16:07:34 +08:00
parent ce48112de2
commit e1549ac3b8

View File

@ -2,7 +2,7 @@
{{ if $featured_image }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
{{ $featured_image := (trim $featured_image "/") | absURL }}
<header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
<header class="cover bg-top" style="background-image: url('/{{ $featured_image }}');">
<div class="pb3-m pb6-l bg-black-60">
{{ partial "site-navigation.html" . }}
<div class="tc-l pv6 ph3 ph4-ns">