Build Your Second Github Page -- Project Page
Once we have build our blog page on Github, the only reserved domain {yourname}.github.io
has been allocated to your accountm so that we cannot bind any other domain to it. But what if we want to build our second blog or setup another page for different purpose of use? Here we are – Github Project Page.
The process is just the same as building the personal blog. Let’s find it out.
Initialize Blog and Bind Github Pages
Create a repository on Github, and you can name it whatever you like.
Create a new branch named
gh-pages
Initiate the blog files on your computer (refer to my previous blog). Please pay attention, the Github configuration should be change to the branch.
1
2
3
4deploy:
type: git
repo: https://github.com/{yourname}/{reponame}.git
branch: gh-pagesUpdate URL configuration in
_config.yml
1
2url: http://{yourname}.github.io/reponame
root: /reponame/hexo clean
hexo g -d
Done! You can go to
{yourname}.github.io/{reponame}
to check your website.
Bind Custom Domain
Go to hexo
source
folder and add a new file namedCNAME
, fill in the domain. (To avoid being wiped out when submit changes to github)Go to aliyun.com (where you bought domain) and add a new settings for resoving. The record value should be the same as
{yourname}.github.io
- Post link: https://leisurelyfool.com/posts/2d90b43b.html
- Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.