Basic RMarkdown to Github Flavored Jekyll, usefull for writting posts on a blog hosted on GitHub, straight from RStudio.
If ever you start a blog today, you definitely should use Blogdown, which is the best tool to create a blog within RStudio. As Yuhui pointed out on Twitter, you can generate Jekyll with {blogdown}, and here’s how to: https://bookdown.org/yihui/blogdown/jekyll.html. I strongly advice you use this method.
But if (as me), you haven’t taken the time to convert to Blogdown, this package is here to help you being more efficient with RStudio and Jekyll. This is the package I use for colinfay.me.
{jekyllthat} contains :
An RStudio Rmd template that you can get from New File > RMarkdown > From Template
A Markdown format to turn Rmd into a github md for Jekyll. If you’re not using the template, add to your Rmd yaml :
output: jekyllthat::jekylldown
The easier worflow is to keep your Rmd inside the _posts
folder. If
you want to do that, you should specify jekyll to ignore this in your
config.yml. You can manually specifiy this in the exclude
part, by
adding :
You can also use the config_rmd()
, that takes as argument the path to
your config.yml
. But as it is a 15 seconds job to do it manually, you
should definitely do it manually.
Create a new post with New File > RMarkdown > From Template
Fill / Modify the yaml as usual.
Write and save into the _posts
folder
jekylldown
If you’ve followed the step described in “Before using”, you can push everything (Rmd, folders, md), only the .md will be built for your website.
A better shiny widget
Write tests
Questions and feedbacks welcome!
You want to contribute ? Open a PR :) If you encounter a bug or want to suggest an enhancement, please open an issue.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.