Blogdown Jekyll
Theme by
Yihui |Updated:
26 Apr 2021
|205 Stars
Automatically knit R Markdown documents, build them with Jekyll, and serve the website with servr locally
Overview:
This article discusses the use of Jekyll, knitr, blogdown, and R Markdown to create a minimal website. It explains how to serve the Jekyll website locally with R and automatically compile R Markdown posts. The article also provides options for hosting the website either on GitHub or on your own server. It mentions that Jekyll is supported in blogdown but suggests using Hugo for better support.
Features:
- Minimal Jekyll-based website: The article demonstrates how to create a minimal website using Jekyll, knitr, blogdown, and R Markdown.
- Local preview: It explains how to serve the Jekyll website locally with R, allowing you to preview the website before deployment.
- Automatic compilation: R Markdown posts can be compiled automatically, with the web pages being automatically refreshed in your web browser.
- Hosting options: The article provides two options for hosting the website - pushing Markdown blog posts to GitHub or hosting the HTML files on your own server.
- License information: The original website was created from the official Jekyll repo and additional code (mainly R code) is under the MIT License. The blog post mentioned in the article is under the CC-BY 4.0 International License.
- Hugo support: While Jekyll is supported in blogdown, the article suggests opting for Hugo due to its better support in blogdown.
Installation:
To build and serve the Jekyll website locally, follow these steps:
- Install blogdown and Jekyll.
- Call the
serve_site()
function to serve the website locally.
To host the website, you have two options:
- Push the Markdown blog posts to your GitHub repo (e.g., the gh-pages branch) and let GitHub generate the website for you.
- Host the HTML files generated under the
_site/
directory on your own server.
Summary:
This article explains the process of creating a minimal website using Jekyll, knitr, blogdown, and R Markdown. It discusses the steps to serve the Jekyll website locally with R and compile R Markdown posts automatically. The article also provides instructions for hosting the website on GitHub or on your own server. It suggests considering Hugo as a more supported alternative to Jekyll in blogdown.