我知道你能够创建子域重定向到不同的存储库,如:您可以将多个自定义域添加到多个Github存储库吗?
example.com
foo.example.com
但你可以这样做:
example.com > foobar.github.io
differentdomain.com > foobar.github.io/different-repository
还是有一定的办法有一个新的自定义域重定向到specfiic存储库?
我知道你能够创建子域重定向到不同的存储库,如:您可以将多个自定义域添加到多个Github存储库吗?
example.com
foo.example.com
但你可以这样做:
example.com > foobar.github.io
differentdomain.com > foobar.github.io/different-repository
还是有一定的办法有一个新的自定义域重定向到specfiic存储库?
要让Github Pages在foobar.github.io
您需要一个用户(或“organiaztion”)帐户github.com/foobar
和存储库github.com/foobar/foobar.github.io
。
要让Github页面在foobar.github.io/different-repository
你需要一个分支gh-pages
在github.com/foobar/different-repository
。
配置example.com
显示foobar.github.io
您添加DNS记录A
到指向Github Pages IP域和添加文件github.com/foobar/foobar.github.io/CNAME
与内容“example.com”(不要忘了添加,提交和推送)。
配置differentdomain.com
显示foobar.github.io/different-repository
您添加DNS记录A
到指向Github的页面IP域中及gh-pages
分支内容“differentdomain.com”(添加,提交,推)添加文件github.com/foobar/different-repository/CNAME
。