Skip to main content
我们经常发布文档更新,此页面的翻译可能仍在进行中。 有关最新信息,请访问英语文档

Hover over a link to another article to get more details. If you have ideas for how we can improve this page, let us know in the discussion.

将子模块用于 GitHub Pages

您可以将子模块用于 GitHub Pages 以在站点代码中包含其他项目。

GitHub Pages 适用于具有 GitHub Free 和组织的 GitHub Free 的公共仓库,以及具有 GitHub Pro、GitHub Team、GitHub Enterprise Cloud 和 GitHub Enterprise Server 的公共和私有仓库。 有关详细信息,请参阅“GitHub 的产品”。

如果 GitHub Pages 站点的仓库包含子模块,则在构建站点时会自动拉取其内容。

只能使用指向公共仓库的子模块,因为 GitHub Pages 服务器无法访问私有仓库。

对子模块(包括嵌套子模块)使用 https:// 只读 URL。 你可以在 .gitmodules 文件中进行此更改。

延伸阅读