We use a tool called GitHub Pages on GitHub to be able to host our coursework on their servers, making it visible to anyone on the web if we wish. It’s an amazing cheap web hosting option! Here’s how to set it up.
yourgithubusername and if you called the repository something other than cart253 use that instead)Note: It can take a little time for this change to take effect, so do be patient if it doesn’t work at first in the next step.
Note: Any time you start a new repository that you want to use GitHub Pages you need to activate it for that repository.
The point of GitHub Pages is to make your programming projects available online as a website. Let’s view the version-control-workflow project you created earlier. Once GitHub Pages is active, it should be at:
https://yourgithubusername.github.io/cart253/topics/version-control/version-control-workflow/
yourgithubusernamecart253 if it’s differenttopics/version-control/version-control-workflow if it’s differentAll going to plan, when you build the right URL you’ll see the project in the browser, but this time it’s onlin! You could send it to your friends and relatives! Why not??
When you want a link to your projects online (and you will need this) it’s always the same structure:
https://yourgithubusername.github.io/yourrepositoryname/path/to/the/projectfolder/
yourgithubusername should be your GitHub usernameyourrepositoryname should be your repository name (probably cart253 but if you make other repositories you would use their names instead)path/to/the/projectfolder/ should be the hierarchy of folder names that gets your to the project you want to view (the folder with the index.html for the project inside it)Remember to activate GitHub Pages for any repository you want to be able to view like a website. And practice understanding how to write the URL that points you at a project inside that repository.