I've encountered an issue with my website that functions perfectly fine locally but when deployed on gh-pages, it results in several 404 errors while attempting to retrieve resources. One such example is a line of CSS for setting the background:
background: #fff url(/assets/images/bg.jpg) repeat top left;
The specific 404 error message I receive is this:
github.io/assets/images/bg.jpg
Instead, the correct path should be:
github.io/myProject/assets/images/bg.jpg
Any suggestions on how to resolve this issue and make it work correctly?