Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Github Pages not working for static website

I have a static website repository that is pure HTML, CSS, and JavaScript.

When I run live server on VSCode, the site runs just fine

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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?

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading