rmarkdown :: render_site()中的rmarkdown :: render_site()错误:未找到站点生成器 [英] rmarkdown::render_site() Error in rmarkdown::render_site() : No site generator found
问题描述
我正在尝试使用以下示例将3个文件编织在一起: http://rmarkdown.rstudio.com/rmarkdown_websites.html
I am trying to knit together 3 files using this example: http://rmarkdown.rstudio.com/rmarkdown_websites.html
我的文件都共享同一目录,该目录已在RStudio构建选项中设置.我从字面上复制了示例中的YML,并使用了自己的文件名.即使直接复制示例,也会出现相同的错误.
My files all share the same directory, which has been set in the RStudio build options. I literally copied the YML from the examples with my own file names. Even if I copy the examples directly, I get the same error.
我什至从RMarkdown Github运行site_generator函数: https ://github.com/rstudio/rmarkdown/blob/master/R/render_site.R#L157
I even ran the site_generator function from the RMarkdown Github: https://github.com/rstudio/rmarkdown/blob/master/R/render_site.R#L157
我注意到有一些不需要的自定义生成器选项.我要做的就是能够将多个markdown文件编织到一个网页中,然后为每个页面/部分创建一个带有标签的导航栏.
I noticed there are options for custom generators, which I do not want. All I would like to do is be able to knit together several markdown files into a single webpage and then create a navbar with tabs for each page/section.
推荐答案
尝试使用名称错误的YAML配置文件进行构建时,我遇到了相同的错误.具体来说,网站的RStudio构建选项要求将配置文件命名为_site.yml
.
I got the same error when attempting to build with an incorrectly named YAML config file. Specifically, the RStudio build option for a website requires that the config file be called _site.yml
.
验证此文件是否存在,并且您正在使用扩展名.yml
而不是.yaml
(即使
Verify that this file exists and that you're using the extension .yml
rather than .yaml
(even though the latter is preferred).
这篇关于rmarkdown :: render_site()中的rmarkdown :: render_site()错误:未找到站点生成器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!