Setting images as background-image in css/sass

This example demonstrates, among other things, how to use a global resource (i.e., a file in the assets directory) as a background image when transpiling Sass to CSS.

git clone --single-branch -b hugo-github-issue-10558 https://github.com/jmooring/hugo-testing hugo-github-issue-10558
cd hugo-github-issue-10558
npm ci
hugo server

Reference:
https://discourse.gohugo.io/t/initialize-sass-variables-from-hugo-templates/42053

1 Like