【问题标题】:Hugo Error while rendering "page"渲染“页面”时出现 Hugo 错误
【发布时间】:2018-08-14 08:24:09
【问题描述】:

我使用 Hugo 和 Minimo 主题创建了一个网站。我设置了站点,它在我的两台计算机上都运行良好(一台是 Windows,另一台是 Mac)。但是,当其他作者尝试使用render_site() 命令时,却抛出了如下错误:

Building sites … ERROR 2018/08/11 22:49:17 Error while rendering "page" in "post\\": template: _default/single.html:1:3: executing "_default/single.html" at <partial "header" .>: error calling partial: template: partials/header.html:10:7: executing "partials/header.html" at <partial "sidebar/sid...>: error calling partial: template: partials/sidebar/sidebar.html:10:6: executing "partials/sidebar/sidebar.html" at <partial "extras/widg...>: error calling partial: template: partials/extras/widget_area.html:7:8: executing "partials/extras/widget_area.html" at <partial (print "widg...>: error calling partial: template: partials/widgets/taxonomy_cloud.html:18:5: executing "partials/widgets/taxonomy_cloud.html" at <partial "extras/taxo...>: error calling partial: template: partials/extras/taxonomy_cloud.html:32:24: executing "partials/extras/taxonomy_cloud.html" at <$Site.GetPage>: error calling GetPage: too many arguments to .Site.GetPage: [taxonomyTerm tags apresentação]. Use lookups on the form {{ .Site.GetPage "/posts/mypage-md" }}
    Building sites … ERROR 2018/08/11 22:49:18 Error while rendering "page" in "post\\": template: _default/single.html:1:3: executing "_default/single.html" at <partial "header" .>: error calling partial: template: partials/header.html:10:7: executing "partials/header.html" at <partial "sidebar/sid...>: error calling partial: template: partials/sidebar/sidebar.html:10:6: executing "partials/sidebar/sidebar.html" at <partial "extras/widg...>: error calling partial: template: partials/extras/widget_area.html:7:8: executing "partials/extras/widget_area.html" at <partial (print "widg...>: error calling partial: template: partials/widgets/taxonomy_cloud.html:18:5: executing "partials/widgets/taxonomy_cloud.html" at <partial "extras/taxo...>: error calling partial: template: partials/extras/taxonomy_cloud.html:32:24: executing "partials/extras/taxonomy_cloud.html" at <$Site.GetPage>: error calling GetPage: too many arguments to .Site.GetPage: [taxonomyTerm tags apresentação]. Use lookups on the form {{ .Site.GetPage "/posts/mypage-md" }}
    The system cannot find the path specified.
    Error in shell(cmd, mustWork = TRUE, intern = intern) : 
      '"C:\Users\pedro\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t minimo' execution failed with error code 1
    In addition: Warning messages:
    1: running command '"C:\Users\pedro\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t minimo' had status 65535 
    2: running command '"C:\Users\pedro\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t minimo' had status 65535 
    3: running command 'C:\WINDOWS\system32\cmd.exe /c "C:\Users\pedro\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t minimo' had status 1 

我已尽力重现,但无济于事。我们尝试过更改目录(他在 Google Drive 中使用它,我们认为我可能是符号链接问题)。我的任何电脑都没有这个问题。

我不知道这是否有用,但是:我的两台电脑都运行葡萄牙语,而另一位作者使用的是英文电脑。

提前致谢

【问题讨论】:

  • 不确定这是否是问题,但 Minimo 主题需要高 Hugo 版本(不记得确切但需要 > v0.33;v0.46 可以正常使用)。也许检查你朋友的雨果版本? (blogdown::hugo_version())
  • 一切都更新了,这是我们尝试的第一件事。还是谢谢。

标签: r hugo blogdown


【解决方案1】:

降级解决了这个问题。主题中有一些更新仅适用于新版本,因此必须注意它。

【讨论】:

    猜你喜欢
    • 2011-01-14
    • 1970-01-01
    • 2019-01-06
    • 1970-01-01
    • 2016-04-16
    • 1970-01-01
    • 1970-01-01
    • 2017-09-05
    • 2019-10-18
    相关资源
    最近更新 更多