I searched the documentation, stack overflow, google and attempted every CSS change that I could think of, and cannot figure out how to set the image as the background for a div tag or element such as a body using CSS. It should be simple, right?
Attempts to include:
#element { background-image: url(<% asset_path "image.jpg" %>); } #element { background: url(<% asset_path "image.jpg" %>); } #element { background-image: url({% asset-path "image.jpg" %}); } #element { background-image: {% asset-path "image.jpg" %}; } #element { background-image: url("image.jpg"); }
And a lot more. Basically, I tried all the possible options that I could think of, including many that I did not expect to work, and my attempts to find the answer were exhausted.
Can anyone who knows Jekyll and Jekyll-Assets clarify for themselves and the future Jekyll initiates how to complete this task?
css sass jekyll
James targett
source share