Creating a blog is simple

I thought that creating a blog with R was about to be a nice little project. It turned out to be way easier than what I imagined it to be thanks to the blogdown package. The advantage of this process is quite obvious: You only need to fiddle with R and not yet another program or coding language. This means that you can have everything neatly in your RStudio and update your blog from there. It simplifies the reporting of research and other processes as you can include your code in the RMarkdown file and it will be rendered by blogdown automatically. So you don’t need to export and import your files (e.g. graphs) manually. Very handy!

The book by Yihui Xie is pretty much encompassing which is why I won’t describe the steps here. Furthermore, I found this tutorial on Youtube to be quite helpful, especially since I am new to the GitHub experience.

Points to keep in mind

Most of the important things to take note of are covered in the links above. However, there are still some aspects to point out:

  • There is one thing you should never - and I mean never - forget to check: The “baseURL” in the config.yaml script. Otherwise, you will see the images created in your RMarkdown script on your served (local) site but as soon as it’s uploaded these images will get lost due to the incorrect “baseURL”. Typically, you will find this at the very start of the config.yaml. So please don’t make the same mistake as I did and save yourself some time of swearing.
  • Using Netlify to build your site is very convenient. You only need to connect the GitHub repo to Netlify and you are good to go.
  • If you already own a domain, the setup is also quite easy if you use Netlify. You just need to follow their protocol which probably involves you needing to supply an IP address to your current registrar.
  • If you are new to GitHub, never forget the three steps: Stage - Commit - Push. Otherwise, your page won’t be up to date.