Publishing your project on GitHub Pages
Great, you have your project on GitHub. It doesn’t get any more complex. You’re just two small preparations and a few clicks away from having your project online!
Preparing the files for publishing
Before we can click on that publish button, we need to ensure that your files are interlinked in the right way, and that your main HTML file is called index.html
.
Keeping your paths absolute
First, let’s check all our file references. There are two links from within our HTML file, one to our .css
file and one to our .js
file:

Correct links within the HTML file
All paths on GitHub can be referenced as absolute paths pointing to the root directory. This saves you from working out the relative path from any file at any depth of your directory tree. However, it also means that you might have to change relative paths from your local directory to root-based absolute paths. Your HTML file planets.html
(we will change this to index.html
in the next step) lives in the...