Can I create more than one repository for github pages?

后端 未结 9 698
余生分开走
余生分开走 2020-12-07 08:16

I created a repository for hosting a blog on github.Is there any way that I can create more to host multiple blogs?Am I limited to just one repository for hosting(since

9条回答
  •  长情又很酷
    2020-12-07 08:49

    No you are not limited, it is possible to have multiple GitHub Pages sites within one account. Create another GitHub repository and push your site files to the gh-pages branch. This would result in the site being hosted at tshepang.github.io/repo-name

    Now, push another file "CNAME" to the same repository and branch and fill it with movies.tshepang.net. Log in to your DNS host and add the CNAME to point to "tshepang.github.io" (just like the original site).

    This would allow you to have seemingly two different sites on different domains. This would not work for having two or more sub-domains within github.io itself.

提交回复
热议问题