如何从项目的文档创建Github页面? [英] How to create Github pages from a project's documentation?

查看:113
本文介绍了如何从项目的文档创建Github页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Github上有一个项目,其中包含一些包含一些自动生成的HTML文档的目录。我想在Github的项目页面设施中使用该文档。

I have a project on Github that has a directory containing some automatically generated HTML documentation. I would like to use that documentation within Github's project pages facility.

所以,我已经阅读了关于如何创建项目的gh页面根分支。这有效地创建一个空的分支。

So, I've read the instructions on how to create the project's gh-pages root branch. This effectively creates an empty branch.

我想要的帮助是镜像 / docs 路径从 master 分支,所以它们在 gh页面分支的根目录。接近这个的最好方法是什么?

What I'd like help with is mirroring the html files in the /docs path from the master branch, so they are in the root of the gh-pages branch. What is the best way of approaching this?

推荐答案

在这里回答我自己的问题已经用Git子模块

Answering my own question here... have achieved what I wanted with Git submodules.

我基本上复制了什么是详细说明了这一点,但总而言之:

I basically copied what's detailed in this sake task, but in summary:

  • Moved the docs path into a temp folder. Commit changes.
  • Created a clean gh-pages branch as per the usual instructions
  • Moved everything from the temp folder into the new gh-pages branch. Commit changes.
  • Back in the master branch, add the remote gh-pages as a submodule in the docs folder.
  • Commit changes. Voila!

这篇关于如何从项目的文档创建Github页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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