【问题标题】:Having issues with .gitmodules in getting my Hugo Site onto github pages.gitmodules 在 github 页面上获取我的 Hugo 站点时遇到问题
【发布时间】:2017-10-12 22:43:08
【问题描述】:

所以我设法使用 Hugo 框架和 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/.

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

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

【问题讨论】:

    标签: github git-submodules hugo


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-15
      • 2021-05-30
      • 1970-01-01
      • 2023-03-24
      • 2018-12-16
      • 2020-08-10
      • 1970-01-01
      • 2021-06-04
      相关资源
      最近更新 更多