1 Creating Your Website
To create a personal website with GitHub, you must already have a GitHub account. If you do not, please make one.
These instructions largely follow the instructions from GitHub, found here.
- In GitHub, create a new repository called username.github.io where username is replaced by your actual username. For example, if my username is pandabear, my repository is called pandabear.github.io
- On your desktop, create a folder. I called mine “Personal_Website”
- Clone your GitHub repository to your local folder. You can do this with your IDE of choice or through the command line.
- To copy the full repository link from your GitHub repository, use the green clone button, and then the copy icon. Paste this where your IDE asks for it.
- Or if you are using your command line, you can change directory (using the cd command) into your “Personal_Website” folder and then type out “git clone <paste your link here>”.
- Now, create a new file inside of your repository called “index.html”
- Inside the file, copy and paste this text:
<!DOCTYPE html>
<html>
<body>
<h1>Hello World</h1>
<p>I’m hosted with GitHub Pages.</p>
</body>
</html> - Save your file.
- Commit and push your changes to GitHub.
- Check in your GitHub repository to make sure that the commit is pushed. You should see index.html with the commit message that you gave it.
- Check your actual website by going to username.github.io. It should say (in very basic styling):
Hello World
I’m hosted with GitHub Pages.
- Now that our site is hosted correctly, we can actually build our site to look how we want it!
If you need more instructions about committing and pushing to GitHub, check out our Git and GitHub Guide.