0

我正在尝试在 blogdown 中安装 hugo-academic 主题。在我的站点目录中,我运行了 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 位操作系统。

4

1 回答 1

2

从错误信息来看,您需要在文件中添加一个date_format参数config.toml。尝试在最后添加:

[params]
  date_format = "Mon, Jan 2, 2006"

查看示例配置文件以了解您可以更改的更多设置。

于 2017-06-03T13:34:05.173 回答