如果 GitHub Pages 站点的仓库包含子模块,则在构建站点时会自动拉取其内容。
只能使用指向公共仓库的子模块,因为 GitHub Pages 服务器无法访问私有仓库。
对子模块(包括嵌套子模块)使用 https:// 只读 URL。 您可以在 .gitmodules 文件中进行此更改。
延伸阅读
- Pro Git 手册中的“Git 工具 - 子模块”。
- "排查 GitHub Pages 站点的 Jekyll 构建错误"
您可以将子模块用于 GitHub Pages 以在站点代码中包含其他项目。
GitHub Pages is available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. 更多信息请参阅“GitHub 的产品”。
如果 GitHub Pages 站点的仓库包含子模块,则在构建站点时会自动拉取其内容。
只能使用指向公共仓库的子模块,因为 GitHub Pages 服务器无法访问私有仓库。
对子模块(包括嵌套子模块)使用 https:// 只读 URL。 您可以在 .gitmodules 文件中进行此更改。