Failed to load resource Github pages

I’ve been working on this script to keep track of my finished front-end challenges but I’m getting this error saying that it cannot load the recources but the first one works perfectly. I attached an image with the console messages here.

Also, that error I’m getting only when the site is deployed on GitHub pages, on local works perfectly . Any tips to fix that problem?

Link repo:

>Solution :

Change absolute path to relative path in script.js

  img.src = `./${project}/design/desktop-design.jpg`;
  projectLink.href = `./${project}/index.html`;

Leave a Reply