GitHub Pages
If you want to show people what you build, one of the easiest way to publish your code as a website is using GitHub Pages. Simply create a new repository. Add all the files you need for your website. Make sure when copying over files from your existing project the the paths to your libraries are correct. If you are not sure and your project is not complex, simply put everything in the main folder without any subfolders and update the index.html
file accordingly. In the following images, you see a step by step example:
![Setup a new repository](/images/material/github-1.jpg)
When naming your repo, have in mind that the name will be part of the URL (see below)
![Upload your files](/images/material/github-2.jpg)
![Wait for upload to complete](/images/material/github-3.jpg)
![Make sure all files are here and edit index.html if neccessary](/images/material/github-4.jpg)
![Check if the paths to the libraries are correct](/images/material/github-5.jpg)
![Edit if neccessary](/images/material/github-6.jpg)
![Go to settings > pages](/images/material/github-7.jpg)
![Select the branch of your repo, if you have not changed anything, this should be "main"](/images/material/github-8.jpg)
![Save and you are ready to go](/images/material/github-9.jpg)
The URL where you can now find your website is: https://YOUR-USERNAME.github.io/NAME-OF-YOUR-REPO/
You can create as many of those repository websites as you want. Make sure that your website's HTML file is named index.html
, if not you need to add it to your URL: https://YOUR-USERNAME.github.io/NAME-OF-YOUR-REPO/hello.html