簡體   English   中英

如何發布“主”分支頁而不是“gh-pages”?

[英]How to publish “master” branch pages instead of “gh-pages”?

形成文檔user-organization-and-project-pages。

用戶和組織頁面位於專用於頁面文件的特殊存儲庫中...

  • 來自主分支的內容將用於構建和發布頁面。

“與用戶和組織頁面不同,項目頁面與它們的項目保存在同一個存儲庫中....

  • gh-pages分支用於構建和發布。

因此,如果我有一個公共存儲庫,我的項目頁面將作為"gh-graph"分支提供,它將在URL http://username.github.io/projectname

但是如何將母版頁中的內容發布到此URL。 或者我如何創建用戶/組織頁面?

用戶/組織頁面和項目頁面之間的實際區別是什么?

用戶/組織頁面來自http://username.github.io 它們的內容位於存儲庫username/username.github.iomaster分支中( http://github.com/username/username.github.io.git )。

項目頁面來自http://username.github.io/proj 它們的內容位於存儲庫username/projgh-pages分支中。

我的user頁面在這里https://github.com/snaewe/snaewe.github.com例如(沒什么特別的,只是自動創建) - > http://snaewe.github.io

示例project頁面位於: https//github.com/snaewe/MPC/tree/gh-pages - > http://snaewe.github.io/MPC

注意:我在github使用時創建了這些頁面...github.com作為域名。 今天是...github.io

如果您在項目的master分支中有一個index.html並希望將其用作項目頁面,只需將master分支推送到github項目中的gh-pages分支:

git push origin master:gh-pages

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM