首页 > 解决方案 > 通过 `blogdown` 生成`bookdown site`

问题描述

我的问题是了解是否可以使用 blogdown 生成 bookdown 书。

在阅读https://bookdown.org/yihui/blogdown/并查看https://github.com/rstudio/bookdown/tree/master/inst/examples/Makefile时,似乎一切都建立在:

  cmd = sprintf("bookdown::render_book('index.Rmd', '%s', quiet = %s)", fmt, quiet)
  res = bookdown:::Rscript(c('-e', shQuote(cmd)))

其中的代码似乎在R/render.R

看代码,好像生成了一本书,可以在 RStudio IDE 中查看,也可以通过https://bookdown.org/yihui/bookdown/github.html用作静态站点

不清楚的是,是否有办法blogdownhugo. 好像https://github.com/yihui/hugo-lithium没有这个能力。所以我猜想blogdown在这一点上通过生成 bookdown 书是不可行的。

标签: r-markdownbookdownblogdown

解决方案


推荐阅读