如果github下的项目和username.github.io下的子目录重名会有什么结果?

username.github.io 个人主页(有子目录test)

同时为一个test项目建立了项目主页

两者都指向了:username.github.io/test

阅读 4.4k
2 个回答
新手上路,请多包涵

参见官网的说明。

If the custom domain in your CNAME file is already used by another
GitHub Pages site, you will receive a page build warning. A custom
domain in a CNAME file can only be used once. Here are some examples
of when you'll receive a page build warning for a duplicate custom
domain:

If you have an an apex domain such as example.com in your CNAME file,
this means that either example.com or its www subdomain
(www.example.com) has been used in a CNAME file in another repository
and is being used by the corresponding GitHub Pages site.

Likewise, if you have a www subdomain such as www.example.com in your
CNAME file, this means that either www.example.com or its apex domain
(example.com) has been used in a CNAME file in another repository and
is being used by the corresponding GitHub Pages site.

就是说,只有第一个项目是有效的。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进