在将我的雨果网站放到 github 页面上时遇到 .gitmodules 问题



所以我设法使用Hugo框架和After-Dark主题(https://after-dark.habd.as)创建了一个静态网页。我将我的站点上传到我的存储库 (https://github.com/Lord-Left/Lord-Left.github.io),但是当我尝试构建站点时,出现以下错误:

您的站点在构建时遇到问题:子模块公共不是 使用 .gitmodules 文件正确初始化。欲了解更多信息, 看 https://help.github.com/articles/page-build-failed-missing-submodule/。

这是指向我的子模块文件(位于根目录)的链接。我通过修补它创建了它,它是正确的吗?

https://github.com/Lord-Left/Lord-Left.github.io/blob/master/.gitmodules

在你.gitmodules中,你说

[submodule "after-dark"]
path = after-dark
url = https://git.habd.as/comfusion/after-dark

虽然以下内容对我有用:

[submodule "themes/beautifulhugo"]
path = themes/beautifulhugo
url = https://github.com/halogenica/beautifulhugo

看起来您只是缺少正确指向子文件夹的themes/部分。

最新更新