1.1 Installation

We assume you have already installed R (https://www.r-project.org) and the RStudio IDE (https://www.rstudio.com). Next we need to install the blogdown package in R. Currently it is only available on GitHub, and you can install it using the devtools package:

if (!requireNamespace("devtools")) install.packages("devtools")
devtools::install_github("rstudio/blogdown")

Since blogdown is based on the static site generator Hugo (https://gohugo.io), you also need to install Hugo. There is a helper function in blogdown to download and install it automatically on major operating systems (Windows, macOS, and Linux):

blogdown::install_hugo()

By default, it installs the latest version of Hugo, but you can choose a specific version through the version argument if you prefer.

For macOS users, install_hugo() uses the package manager Homebrew (https://brew.sh) if it has already been installed, otherwise it just downloads the Hugo binary directly.

1.1.1 Update

To upgrade or reinstall Hugo, you may use blogdown::update_hugo(), which is equivalent to install_hugo(force = TRUE). You can check the installed Hugo version via blogdown::hugo_version(), and find the latest version of Hugo at https://github.com/gohugoio/hugo/releases.