in my css I use url() at some places in this way:
style="background-image:url(/images/home/abschnitt1.jpeg)"
this approach generally works and it shows me the background image the way I want when I deploy the website. However for staging purposes I would like to deploy it to github pages aswell. The problem is that with github pages my websites base-uri is not the one I need. It search the pictures at
https://<username>.github.io/
but the website is actually at
https://<username>.github.io/<repository name>
This means it never find these images. My current workaround is that since I deploy it with travis it just renames the stuff in the following way:
mv index.html index.html.old
sed "s/url(/url(\/website-staging1/g" index.html.old > index.html
While this works for this purpose thats definetly a super ugly solution. However I did not find a solution on how to do this without manually fixing the uri. So my question is how I can do this without manually renaming it in this way, whether thats by some kind of a base uri or including it in a different way