Hi,
I have the following code within a partial:
<div class="first" style="background-image: url(https://source.unsplash.com/random);background-size: cover;"
></div>
It works with an external img src but I would like to replace the image src by a image defined in the config file, located in theme’s static directory.
[params]
heroimg = "/images/heroimg.jpg"
I tried the following code unsucessfully:
<div class="first" {{ with .Site.Params.heroimg }}style="background-image: url({{ .Site.Params.heroimg | absURL }});background-size: cover;"{{ end }}>
</div>
Any help to to implement the correct UR or advice for a simpliest way to do it.