With the Rmd files on root (eg. on my /knitr-jekyll/) they are turning into md files, but not on html files. Thus, they appear as simple markdown text. I tried to put them on /_source and on /_posts but it get's worse, in this case I also don't get the md files.
1 Answers
2
votes
I found creating a separate folder all together solves the problem.
/kintr-jekyll/_rmd/test.Rmd
But do remember that when you knit your Rmd
to md
that you knit to the _post
folder if you using the standard bootstrap template. Also make sure that you specified your figure output. Easiest is to write some function which does this for you:
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())
Lastly, go make sure in your .md
file in knitr-jekyll/_post
that the figures are clearly referenced. This should be within your test.md
:
<img align="middle" src="/figures/test/test_image.jpg">
This link might help: R-Bloggers post about jekyll