Git Handbook - Introduction to GitHub Pages
GitHub Pages are public webpages easily hosted and published through GitHub. We can use GitHub Pages to create a simple project website. The content of GitHub Pages can be modified easily through GitHub repository.
This guide will help you to create your website.
Step 1: You have to login to your account and create a new repository
Step 2: Upload your source code to your new repository and this website will use
index.html as a main page of your website.
Step 3: To begin setting up your website, you have to go Settings
Step 4: In Settings, you will see GitHub Pages section.
- In that section, you have 2 options
- Using Source
- Using Jekyll theme
For using Source, click on None then choose master branch and your website will be published at yourusername.github.io/yourrepositoryname
If you want to use Jekyll theme, you can choose in the Theme Chooser and there are serveral themes for you. GitHub Pages will create your website based on a Jekyll theme and your README.md file.
- If you need to create your porfolio website, you can set a name of repository as yourusername.github.io, then your website will be published at yourusername.github.io
Using your custom domains
Custom domain allow you to serve your site from your domain. Firstly, you should setting your domain server and update custom domain on GitHub Pages.
Then, you create a CNAME file on your repository.