Site icon R-bloggers

A new blogging workflow

[This article was first published on Adventures in Data, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Just disovered the Jekyllgithub pages combination. Perfect for a very simple static blog site. I also found a pretty neat integration with RMarkdown which suits me perfectly, as I am mainly using R and will be posting bits and pieces of that.

A summary of how it works…

I'm not going to explain these steps in any detail as they are very well explained in the links above, however if you are an R fanatic like me, it's worth noting the integration with RStudio / RMarkdown. First go install a package called servr.

install.packages("servr")

Thanks for writing and maintainging this Yihui Xie.

The package include a function jekyll(). First create a directory in your Jekyll route directory called _source. Put your .Rmd blog scripts in here and then call the jekyll() function from R with setwd() pointed at your Jekyll route directory. This will compile the script, including any output. The resulting .md files go into the _posts directory and any figures go into figure. Then git commit and git push and your blog is posted.

It really is that easy, now time for my first post…

To leave a comment for the author, please follow the link and comment on their blog: Adventures in Data.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.