首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >关于博客主题(雨果-学术)

关于博客主题(雨果-学术)
EN

Stack Overflow用户
提问于 2017-06-01 14:48:57
回答 1查看 1K关注 0票数 0

我正在尝试在博客中安装hugo-学术主题。在我的站点目录中,我运行了R并安装了

代码语言:javascript
复制
blogdown::install_theme("gcushen/hugo-academic")

安装后,我编辑了config.toml文件,如下所示:

代码语言:javascript
复制
baseurl = "/"
relativeurls = true
languageCode = "en-us"
title = "A Hugo website"
theme = "hugo-academic"
googleAnalytics = ""
disqusShortname = ""
ignoreFiles = ["\\.Rmd$", "_files$", "_cache$"]

在此之后,当我尝试使用blogdown::serve_site()服务站点时,我会得到以下错误:

代码语言:javascript
复制
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位操作系统上。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-03 13:34:05

从错误消息判断,您需要向date_format文件中添加一个config.toml参数。试着在结尾添加以下内容:

代码语言:javascript
复制
[params]
  date_format = "Mon, Jan 2, 2006"

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

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44310748

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档