首页 > 解决方案 > 当我使用 Hugo 运行 server_site() 时,为什么 RStudio 会显示此错误?

问题描述

三个月前,我使用 Hugo 通过 Rstudio 创建了我的网站,一切顺利。但是现在我想添加一些帖子,我在运行时遇到了错误blogdown:::server_site(),具体来说:

    C:/Users/AppData/Roaming/Hugo/0.79.1/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t personal-web -D -F --navigateToChanged
Error: Error building site: failed to render pages: render of "home" failed: execute of template failed: template: index.html:1:3: executing "index.html" at <partial "header" .>: error calling partial: execute of template failed: template: partials/header.html:3:4: executing "partials/header.html" at <partial "head/head" .>: error calling partial: "C:\Users\R\website\layouts\partials\head\head.html:5:43": execute of template failed: template: _internal/opengraph.html:5:43: executing "_internal/opengraph.html" at <.>: range can't iterate over /image

我检查了 Github 中的链接,该链接显然修复了此错误https://github.com/rstudio/blogdown/commit/da1321100ffb9ee0f729ff060ba079ff7edb53cc但我看不到 serve.R 文件在我的计算机上的位置,所以我无法编辑它。因此,我不知道该怎么做才能解决此错误。

先感谢您。

标签: rwebrstudiohugo

解决方案


推荐阅读