Can I create more than one repository for github pages?

后端 未结 9 624
余生分开走
余生分开走 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:59

    Today I created another site and rather than creating branch gh-pages I have configured the master branch in a repository setting --> GitHub pages section select Source as master (or any other branch you want). You will get site link in the same section, in my screen shot I have removed site link.

    0 讨论(0)
  • 2020-12-07 08:59

    This works, but ssl is still something I need to figure. In my case GoDaddy is where my domains rest (url1.xyz), with nameservers pointing to Cloudflare. Then in Cloudflare the A records points to Github Pages. This is website 1 live, running fine. For website 2 I create a subdirectly in my gh-pages repo with website 2 files e.g. url1.xyz/static/website2/ - Then I create a subdomain in Cloudflare (subdomain.url1.xyz). Then create a page rule (url forward) from the subdomain to the subdirectory containing the 2nd website e.g. subdomain.url1.xyz >> mask forward >> url1.xyz/static/website2/ .. Then in GoDaddy I can configure url2.co.uk to mask forward to subdomain.url1.xyz , which presents website 2 e.g. url1.xyz/static/website2/

    0 讨论(0)
  • 2020-12-07 09:04

    You can create multiple blogs in your github account.

    1. One repository can be created under your username. Push your code to branch gh-pages and you can see the site on <username>.github.io

    2. Another one can be created under your organisation. For this you will have to create your organization first. Create a new repository under this organisation and push your code to gh-pages. You can see your site on <organization-name>.github.io

    3. You can also create for each of your project and the site will be available on <username>.github.io/<repository>

    Please refer this for more information on github pages.

    0 讨论(0)
提交回复
热议问题