Hosting Sites Using Github
A website can be hosted using GitHub or another domain service (such as GoDaddy), instead of just locally.
In short: websites can be built locally using a file structure, but to view it online or share it with your friends worldwide you must host it online.
How to host a website using Github
- Create an account on GitHub
- Add a new repository. This is a folder that stores our project files. We can use the repository to also track our changes.
- Ensure that you have added a README file to the repository.
- Add in the files and upload them to github for the website.
- In settings, look at GitHub Pages. This can be used to host the pages
- Select a source where our files reside (main)
- The website will have a link gemerated, and you can share this with anyone on the internet.
- Ensure that all of the links work from the html, and check to make sure that it is in the main directory.