This video explains how you can write accurate paths in the Terminal as well as in your HTML, CSS, and JavaScript files so they work locally as well as on Github Pages.
Code from video: https://github.com/prof3ssorSt3v3/cri...
The github repo has had the path that starts with "/" fixed to work in the final version.