Suppose I purchased the domain name for www.easonjim.com, want to put www.easonjim.com and easonjim.com domain name jump to the following URL Easonjim.github.io.
My account on GitHub is Easonjim, and I've created a new directory for Easonjim.github.io.
Then create a new file named CNAME in this directory with the contents:
Easonjim.comwww.easonjim.com
The next step is to set the resolution address of the domain name as follows:
Just resolve the @ and www to GitHub's IP.
Reference:
https://help.github.com/articles/troubleshooting-custom-domains/
So next, for my individual project, I want to get a homepage, set the project's home page configuration
Reference:
http://chitanda.me/2015/11/03/multiple-git-pages-in-one-github-account/
Just set the following in the settings configuration of the project:
Click "Settings" on the right, page down to the "GitHub pages" section, select "Launch automatic page Generator" > "Continue to Layouts" > "Publish page" Can.
Once done, you can access this, easonjim.github.io/test, where test is the name of the current project.
So the problem is, the above automatically created page is placed in the Gh-pages Branch branch, then if you want to switch to the main branch, the main choice is here Master branch can:
Then the access address is still unchanged, still is easonjim.github.io/test
If you want to change this form, you can only bind your own domain name in the past can be implemented, assuming I will bind the domain name as t.easonjim.com, in the root directory of the project to create a new CNAME file, and write:
T.easonjim.com
You will then find that the domain name you set above is automatically displayed on the pages of GitHub pages:
Next, in the go to the Domain Name resolution Administration page, the t.easonjim.com domain name points to GitHub's IP, as follows:
Finally, you can use t.easonjim.com to access your home page on your custom project.
This feature can refer to Nanyi's project, inspired by this: https://github.com/ruanyf/es6tutorial
GitHub pages and each project is bound to a custom domain name (multiple and top-level domains are supported)