我正在尝试创建我自己版本的Geekdown HUGO网站。我将通过RStudio插件启动一个新项目,并将thegeeklab/hugo-geekdoc作为一个主题。但是,当它全部加载时,服务站点将立即中断,重复下列错误消息:
ERROR 2021/01/13 14:13:02 render of "page" failed: execute of template failed: template: _default/single.html:5:7: executing "_default/single.html" at <partial "head" .>: error calling partial: "D:\Stefan\Gradient\Repositories\handbook\themes\hugo-geekdoc\layouts\partials\head.html:18:29": execute of template failed: template: partials/head.html:18:29: executing "partials/head.html" at <index .Site.Data.assets "main.min.css">: error calling index: index of untyped nil为了繁衍,这就是所需的一切:
blogdown::new_site(theme = 'thegeeklab/hugo-geekdoc')在使用blogdown、hugo和其他主题之前,我还没有遇到过这样的错误。1:https://themes.gohugo.io/hugo-geekdoc/
发布于 2021-01-15 15:12:33
有两个问题。一个来自主题,另一个来自blogdown。窃听器刚刚修好。这个主题的问题是,Github本身并不是一个完整的Hugo主题,还有一些额外的文件需要构建。根据其文件的说法,您必须从它的Github版本下载完整的主题,或者自己构建它(使用gulp)。
使用开发版的blogdown,您可以通过
remotes::install_github('rstudio/blogdown')您可以从Github版本中安装此主题(请记住,在安装blogdown之后,在尝试下面的代码之前,重新启动R):
blogdown::new_site(theme = 'https://github.com/thegeeklab/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz')不过,Github发行版中的主题有一个小问题。也就是说,它不包含exampleSite文件夹。除非您熟悉主题,或者仔细阅读过其文档,否则我建议您在运行文件夹预览站点之前,将blogdown::serve_site()的文件和文件夹复制到新网站的根目录中。如果不执行此步骤,该站点可以正常工作,但它将只包含来自blogdown的一个示例帖子。
https://stackoverflow.com/questions/65702805
复制相似问题