Home > Back-end >  Github Pages not working for static website
Github Pages not working for static website

Time:04-23

I have a static website enter image description here

I setup github pages

enter image description here

But when I actually go to the site link I get a blank page.

Why am I getting a blank page when the site works fine in my localhost when using the VSCode live server?

CodePudding user response:

Look at your URLs.

In your development server, you are publishing at /

On Github Pages, you are publishing at /pizza-legends/

Your URL which starts /Content/... is going to /Content/... on your development server and find the file.

On Github Pages, it is going to /Content/... and not finding the file because it is at /pizza-legends/Content/....

Fix your URLs.


NB: You had your developer tools open. You should have looked at the Network tab and seen all the 404 Not Found errors.

  • Related