Home > database >  Failed to load resource Github pages
Failed to load resource Github pages

Time:05-02

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: https://github.com/trstefan/fmtracker

CodePudding user response:

Change absolute path to relative path in script.js

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

  • Related