我的用户网站中的文件夹是否与项目网站冲突? [英] Does a folder in my user site conflict with a project site?

查看:123
本文介绍了我的用户网站中的文件夹是否与项目网站冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GitHub Pages 允许每个用户拥有一个用户网站(也许是一个主页)和无限的项目网站



当您设置用户网站时,您必须 repo [username] .github.io (其中 [username] 是您的GitHub用户名),URL是默认值:

  http:// [用户名] .github.io / 

[用户名] .github中的 master 分支所做的任何更改.io 回购上传到您的用户网站。



当您设置项目网站时,回购你想要的任何东西(让我们称之为 [projname] )。该网址默认为:

  http:// [用户名] .github.io / [projname] 

您对 gh-pages 分支所做的任何更改c $ c> [projname] 回购上传到项目网站。



我的问题是,如果在您的用户网站存储库,你巧合地有一个文件夹与您的项目网站存储库名称相同?

例如,假设你有一个文件 index.html 在您的用户网站回购文件夹 temp / bob.github.io 。然后,该网页将在线上托管在

  http://bob.github.io/temp/index.html 

现在假设您创建了一个项目网站,其中存储库名称为 temp 。在该回购中,您有一个名为 index.html 的文件。然后,当您将它推送到 gh-pages 分支时,它是否会在线进行托管

  http://bob.github.io/temp/index.html 


解决方案

Github支持响应:

是的,它们会发生冲突。项目网站的网址将为username.github.io/project,用户或组织网站中文件夹的网址为username.github.io/project。



我建议您重命名目录或存储库名称。


GitHub Pages allows each user to have one User Site (maybe a home page) and unlimited Project Sites.

When you set up your User Site, you must name the repo [username].github.io (where [username] is your GitHub username), and the URL is by default:

http://[username].github.io/

Any changes made to the master branch in your [username].github.io repo are uploaded to your User Site.

When you set up a Project Site, you can name the repo anything you want (let's call it [projname]). The URL is by default:

http://[username].github.io/[projname]

Any changes made to the gh-pages branch in your [projname] repo are uploaded to the Project Site.

My question is, what if in your User Site repository, you coincidentally have a folder that has the same name as your Project Site repository?

For example, say you have a file index.html inside a folder temp/ in your User Site repo bob.github.io. Then that page would be hosted online at

http://bob.github.io/temp/index.html

Now say you create a Project Site with repo name temp. In that repo, you have a file called index.html. Then when you push it to thegh-pages branch, would it be hosted online at

http://bob.github.io/temp/index.html

?

解决方案

Github support response:

Yes, they would conflict. The url for Project sites will be username.github.io/project, and the url for a folder in a user or organization site would be username.github.io/project.

I would recommend that you either rename the directory or the repository name.

这篇关于我的用户网站中的文件夹是否与项目网站冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆