在github页面上获取我的Hugo Site时遇到.gitmodules问题

问题描述 投票:1回答:1

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

您的站点在构建时遇到问题:子模块public未使用.gitmodules文件正确初始化。有关更多信息,请参阅https://help.github.com/articles/page-build-failed-missing-submodule/

这是我的子模块文件(位于root中)的链接。我通过修补它来创建它,这是正确的吗?

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

github git-submodules hugo
1个回答
4
投票

在你.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/部分。

© www.soinside.com 2019 - 2024. All rights reserved.