I am coming back with a question. I wonder if it is a bug or not. I buildtmy documentation for serverless purpose, still using this part
{{ $chapter := site.GetPage (trim . " ") }}
{{ if $chapter }}
{{ range sort $chapter.Pages "Weight" }}
{{- $imagePermalink := "" }}
{{if .Params.images}}
{{- with partial "_funcs/get-page-images" . }}
{{- range . | first 1 }}
{{- $imagePermalink = .RelPermalink }}
{{- end }}
{{- end }}
<a href="{{ .Permalink }}" class="overview-card"
style="background-image: url('{{ $imagePermalink }}')">
though in the resulting HTML, I get that:
<a href="./userGuide/tutorialsAndHow-Tos.html" class="overview-card highlight" style="background-image: url('/userGuide/tutorialsAndHow-Tos/images/tutos.jpg')">
It does not load the image unless I remove the first / like so
background-image: url('userGuide/tutorialsAndHow-Tos/images/tutos.jpg')
Do you know where this first slash comes and if it is possible to get rid of it?