Jekyll won’t process Liquid unless the file has YAML Front Matter… e.g.
---
---
It’s likely your main stylesheet has the YAML Front Matter blocks, so what you could do is add a Sass variable to that like:
$baseurl: "{{ site.baseurl }}";
Which if processed correctly will populate the $baseurl
variable with the correct value from site.baseurl
.
And then you can reference that wherever you need it in your other partials or stylesheets:
.bgimage {
background-image: url('#{$baseurl}/images/header.png');
}