Jekyll page works on localhost, but broken on Github Pages

Hi everyone!

I’m a total newbie who is trying to make a blog to document my journey in learning to code.

I followed a few tutorials and have made a site using just the standard minima template, it works locally but when I hosted it on Github Pages, it’s a broken mess. :frowning:

Does anyone know where I made a mistake?

Repo - GitHub - scottcodes/blog
Page - https://scottcodes.github.io/blog/

Thank you in advance for your help and advice!

Hello Scott;

Your repository will works perfectly at FREE github.io domain: https://scottcodes.github.io/blog/

But this will not load perfectly at your custom domain: http://scottcodes.net/

Because all of the external file links are broken.

for example: http://scottcodes.net/blog/assets/main.css it’s broken and 404
Correct link is: http://scottcodes.net/assets/main.css

If I find a chance and time, I will check your repo.

Best wishes;

Please fix and change baseUrl of external links.
So this will work.

For example: blog/_config.yml at e96552a0b1c7c3c4ef8a2d3aaf8a60b1d0a4b2ec · scottcodes/blog · GitHub

Hi @basemax,

Thank you so much for your response! :slight_smile:

What should the baseURL say instead of “/blog” for it to direct to the correct place? Should it be blank? Or should it say “https://scottcodes.github.io/” without the “/blog”?

You are welcome.

The default value of the baseurl at _config.yml is empty string "".
source: Default Configuration | Jekyll • Simple, blog-aware, static sites

So I guess you should remove /blog from here and other places you put that.

Thank you so much @basemax! That worked! :slight_smile: