我正在尝试在博客中安装hugo-学术主题。在我的站点目录中,我运行了R并安装了
blogdown::install_theme("gcushen/hugo-academic")安装后,我编辑了config.toml文件,如下所示:
baseurl = "/"
relativeurls = true
languageCode = "en-us"
title = "A Hugo website"
theme = "hugo-academic"
googleAnalytics = ""
disqusShortname = ""
ignoreFiles = ["\\.Rmd$", "_files$", "_cache$"]在此之后,当我尝试使用blogdown::serve_site()服务站点时,我会得到以下错误:
Started building sites ...
ERROR 2017/06/01 20:02:50 Error while rendering "page": template: theme/_default/single.html:10:7: executing "theme/_default/single.html" at <partial "article_met...>: error calling partial: template: theme/partials/article_metadata.html:7:24: executing "theme/partials/article_metadata.html" at <$.Site.Params.date_f...>: invalid value; expected string
Started building sites ...
ERROR 2017/06/01 20:02:50 Error while rendering "page": template: theme/_default/single.html:10:7: executing "theme/_default/single.html" at <partial "article_met...>: error calling partial: template: theme/partials/article_metadata.html:7:24: executing "theme/partials/article_metadata.html" at <$.Site.Params.date_f...>: invalid value; expected string
The system cannot find the path specified.
Error in shell(cmd, mustWork = TRUE, intern = intern) :
'"C:\Users\Suman\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t hugo-academic' execution failed with error code 1
In addition: Warning messages:
1: running command '"C:\Users\Suman\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t hugo-academic' had status 65535
2: running command '"C:\Users\Suman\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t hugo-academic' had status 65535
3: running command 'C:\WINDOWS\system32\cmd.exe /c "C:\Users\Suman\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" -t hugo-academic' had status 1有什么帮助解决这个问题吗?
注意:我在Windows 10 64位操作系统上。
发布于 2017-06-03 13:34:05
从错误消息判断,您需要向date_format文件中添加一个config.toml参数。试着在结尾添加以下内容:
[params]
date_format = "Mon, Jan 2, 2006"查看示例配置文件,了解您可以更改的更多设置。
https://stackoverflow.com/questions/44310748
复制相似问题