When using servr :: jekyll () on R, where should I save my Rmd files?

With Rmd files in root (for example, on my / knitr-jekyll /) they turn into md files, but not into html files. Thus, they look like simple markup text. I tried putting them in / _source and in / _posts, but it got worse, in this case I also don't get md files.

+1
source share
1 answer

I found that creating a separate folder together solves the problem.

/kintr-jekyll/_rmd/test.Rmd

, Rmd md, _post, . , . - , :

KnitPost <- function(input, base.url = "/") {
  require(knitr)
  opts_knit$set(base.url = base.url)
  fig.path <- paste0("figures/", sub(".Rmd$", "", basename(input)), "/")
  opts_chunk$set(fig.path = fig.path)
  opts_chunk$set(fig.cap = "center")
  render_jekyll()
  knit(input, envir = parent.frame())

, , .md knitr-jekyll/_post , . test.md:

<img align="middle" src="/figures/test/test_image.jpg">

: R-Bloggers jekyll

+2

Source: https://habr.com/ru/post/1626239/


All Articles