为什么我在 Netlify/Hugo 中修复 'builds' 的步骤不起作用?

Why are the steps I took to fix 'builds' in Netlify/Hugo not working?

Netlify/Hugo 没有更新我推送到 Github 的更改。这是一个奇怪的问题,因为就我而言,我没有做任何与发生此问题之前所做的不同的事情。

我已按照此 book and the one offered by of Netlify 的说明进行操作,但 none 有效。

我也联系过 Netlify,但无法完全理解他们回复我后我应该做什么。见下文。

当我查看您的构建时,我看到了 hugo 错误。我怀疑如果你在本地使用 hugo 0.53,你也会在本地获取它们?当您克隆目录的新副本(而不是您在其中进行本地更改的目录)并尝试 运行 hugo 0.53/extended 时,构建工作是否更好?如果是这样那么你的下一个调试步骤ps将在这里:https://github.com/netlify/build-image#running-locally到运行我们的构建容器你自己尝试调试。

我根据此回复所做的如下:

i) 我去了 RStudio 并在 'Git' 中打开了 'shell'。我在那里写了'git clone https://github.com/website_address.git'。

ii) 作为 Git 中此命令的结果,在存储库中打开了一个新文件夹。

iii) 然后我开始 'command prompt' 在我的笔记本电脑上 运行 hugo '0.53/extended'。 'C:\Users\NewUser>docker pull netlify/build:v0.53/extended'。这导致以下错误消息:'docker' 未被识别为内部或外部命令、可运行的程序或批处理文件。

我对 'v.0.53/extended' 稍作修改,但错误仍然存​​在。我也在 Git 中尝试过这行代码,但无济于事。

iv) 我还在我的 Github 存储库中创建了一个 README 文件夹,并复制了 Netlify 提供的这个片段:

[![Netlify Status](https://api.netlify.com/api/v1/badges/b3749a18-96fa-4abc-bfc7-1d4a331ae78e/deploy-status)](https://app.netlify.com/sites/website_address/deploys)

但问题依然存在。

这是 Netlify 显示的错误消息之一:

2:31:20 PM: Build ready to start 2:31:21 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63 2:31:21 PM: build-image tag: v3.3.2 2:31:21 PM: buildbot version: 75cd99f62ada9e21edea53208e8baf0eab85a045 2:31:22 PM: Fetching cached dependencies 2:31:22 PM: Starting to download cache of 104.5MB 2:31:22 PM: Finished downloading cache in 626.785348ms 2:31:22 PM: Starting to extract cache 2:31:25 PM: Finished extracting cache in 3.003714699s 2:31:25 PM: Finished fetching cache in 3.716551911s 2:31:25 PM: Starting to prepare the repo for build 2:31:26 PM: Preparing Git Reference refs/heads/master 2:31:28 PM: Error checking out submodules: fatal: No url found for submodule path 'Blogdown' in .gitmodules 2:31:28 PM: Failing build: Failed to prepare repo 2:31:28 PM: failed during stage 'preparing repo': Error checking out submodules: fatal: No url found for submodule path 'Blogdown' in .gitmodules : exit status 128 2:31:28 PM: Finished processing build request in 6.17222572s 2:31:28 PM: Shutting down logging, 0 messages pending

我怀疑这里暗示了解决我问题的答案:

Error checking out submodules: fatal: No url found for submodule path 'Blogdown' in .gitmodules

所以我检查了这个 answer 但我仍然不知道我应该做什么。

我显然在这里做错了一些(可能很多)事情。但我不知道这些错误在哪里以及是什么。

如果有人能引导像我这样的新手走出这个坑就太好了。

非常感谢。

ps。 Github 和 RStudio 沟通良好。

之前,我在不同的项目中遇到过类似的问题。经过一番尝试后,我找到了解决方案。我的解决方案是解耦子模块并将代码移动到我的代码库中(或为此使用托管包)。

要解耦模块,请进入您的子模块文件夹,删除 .git 文件夹并将文件添加到您的 git 存储库。在命令行上我会这样做:

// going into the submodule - might need to tweaked, depending on the exact path
cd Blogdown

// delete the git submodule
rm -rf .git

// going out of the directory
cd ..

// adding everything to git
git add .

通过这些步骤(以及可能对路径进行的细微调整),我已经能够为我解决这个问题。