很多关于GithubPages的教程都弄错了吧? 还是我理解错了?
一. 描述问题&上下文环境
讨论username.github.io
这一类pages
只是Google了几篇教程,有的难以看懂不说,我发现有些概念可能还弄错了.
比如官方说发布分支是master
,而许多教程认为是gh-pages
另外,pages其实有4种,而不是2种
但是,有一句话令我困惑
Content from the master branch will be used to build and publish your GitHub Pages site.
上面那句话,让我糊涂了, master
分支都可以build和publish了
那其实gh-pages
分支没有什么用
那实际上
gh-pages
分支是干嘛的?
另外,所有每种pages的目的,我都懂(其实官方链接已经很直白了https://help.github.com/articles/user-organization-and-project-pages/)
我认为对UserPages完全没有必要弄得那么神秘(如很多教程那样), 直接master上写md,构建, 推送html到github即可, (又是这又是那的, 让人摸不着头脑)
二. 相关代码&重现
User & Organization Pages live in a special repository dedicated to GitHub Pages files. You will need to name this repository with the account name.
You must use the username.github.io naming scheme.
Content from the master branch will be used to build and publish your GitHub Pages site.
You can only use your own account name for a User or Organization Page repository. A repository like joe/bob.github.io will not build a User Pages site.
When User Pages are built, they are available at http(s)://<username>.github.io.
Building your User & Organization Pages
User Pages can be built by any user account with a verified email address. They can also use deploy keys to automate the process.
Organization Pages can be built by any member with push access to the repository and a verified email address. To automate builds, you can set up a machine user as a member of your organization. Deploy keys aren't supported for Organization Pages.
官方介绍: https://help.github.com/articles/user-organization-and-project-pages/
三. 报错信息
四. 相关截图
五. 已经尝试哪些方法仍然没有解决(附上相关链接)
https://help.github.com/articles/user-organization-and-project-pages/
各种Pages是干嘛的,就不必复述官方manual了
六.问题简化
gh-pages
分支干嘛的?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Github Pages有两种
一个组织/个人主页面 会显示master分支
项目页是用来干嘛的呢
一般主页都是 组织或者个人用来介绍自己的。
项目页是用来介绍某个项目的。
一个人或者组织会有多个项目,所以项目页会显示gh-pages分支,方便扩展。