GitHub Pages not working correctly

GitHub Pages not working correctly
0

#1

Hello folks.
Do You use GitHub pages to host your work?
I’m new to GitHub and I need help, because the content on CodePen and the content on GitHub pages is different.
How do I avoid it?

Here are the example links:
https://github.com/Tgralak/linear-interpolation

gh pages: https://tgralak.github.io/linear-interpolation/
codepen: http://codepen.io/Tgralak/full/GmzqoE/


#2

You probably will understand yourself if you open the browser console on the hosted github page and review the errors, but the links to the your style.css and your script.js file in index.html are wrong.


#3

Why are they wrong?
It works also offline when i open it as html file


#4

you have this line on your index.html (on gh-pages branch of the repo):
<link rel="stylesheet" href="css/style.css">

this indicates that your stylesheet is located on the css folder with the name style.css while there’s no css folder and the stylesheet is placed in the root folder (on the gh-pages branch). the same goes for the js file. you should fix this.


#5

note that it doesn’t matter what you place on the master branch of your repo. Only the files that are on the gh-pages branch will be loaded for the website.


#6

Thank you very much!!! I couldn’t figure out whats wrong for like one hour lol