A very basic template repository to get started with GitHub pages.
- Click Use this template > Create a new repository in the top right menu bar
- Set the new Repository name (you will automatically be set as the owner)
- The address for your new website will be
https://<your username>.github.io/<new repository name>
- For example, if you name your repository
portfolio
, the final URL will behttps://<your username>.github.io/portfolio
- Tip: To make the final URL
https://<your username>.github.io
(without any extra path on the end), name the new repository<your username>.github.io
- The address for your new website will be
- Click Create repository, and you will be redirected to your new repository (this may take a moment)
- Go to Settings (top menu) > Pages (left-hand menu)
- Under the Build and deployment > Branch section, change None to main, then Save
- The site will immediately be published, but will take 1-2 minutes to build.
You now have an index.html
file into which you can put any HTML code. Additionally, you can uncomment the script.js
line within the <head>
tag, and then add any JavaScript you need to that file.