【问题标题】:adding sub gh-pages to a Project page将子 gh 页面添加到项目页面
【发布时间】:2015-08-05 22:07:27
【问题描述】:

我在 github 上有一个 project,它有不同的文件夹,每个文件夹代表教程中的一个步骤,并包含自己的网页。结构如下

根文件夹

  • 迭代1
  • 迭代2
  • 迭代3

等等……

  • 迭代7

我想将每个Iteration的内容部署到自己的gh-page/project页面中,实现的过程是什么。 基本上我想要实现的是拥有以下网页:

用户名.github.io/projectname/Iteration1

用户名.github.io/projectname/Iteration2

等等。

用户名.github.io/projectname/Iteration7

感谢this,我知道如何将子文件夹部署到 github 页面,但遵循这意味着只有一个迭代部署在 username.github.io/projectname,这不是我想要实现的。

【问题讨论】:

  • 您可以将链接发布到您的仓库吗?
  • 当然,补充说,不过,这是一项正在进行中的工作。
  • 你想得到 url bondifrench.github.io ?
  • 例如,我已经将github.com/NaiveShark/soft url'ed 到naiveshark.github.io/soft
  • 不,我想要bondifrench.github.io/mithril-employee-directoree/iteration1bondifrench.github.io/mithril-employee-directoree/iteration2 等。每次迭代都有一个

标签: github github-pages


【解决方案1】:

在项目存储库github.com/username/projectname 中,如果要发布,则必须将代码放在gh-pages 分支上。

我已经克隆了你的 repo,创建了一个新的 gh-pages 分支并将其推送到 Github。

http://pygmeeweb.com/mithril-employee-directory/iteration1/

http://pygmeeweb.com/mithril-employee-directory/iteration2/

【讨论】:

  • 我希望git subtree push --prefix mithril-employee-directory/iteration1 origin gh-pages 的变体(还没有尝试过)
  • 最终起作用的是,当在mithril-employee-directory 中,编写以下命令git push -f origin master:gh-pages,我不需要克隆我的存储库
【解决方案2】:

您的bondifrench 用户需要mithril-employee-directoree 存储库,并且您的存储库中需要gh-pages 分支。将您的iterationN 文件夹放到gh-pages 分支,您的主机上就有了iterationN 文件夹。将其与 html 中的a href='iterationN\page' 链接。

GH help

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-12-13
    • 1970-01-01
    • 2014-06-25
    • 2011-02-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多