We assume you have already installed R (https://www.r-project.org) (R Core Team 2018) and the RStudio IDE (https://www.rstudio.com). If you do not have RStudio IDE installed, please install Pandoc (http://pandoc.org). Next we need to install the blogdown package in R. It is available on CRAN and GitHub, and you can install it with:
## Install from CRAN install.packages("blogdown") ## Or, install from GitHub 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):
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.
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.
R Core Team. 2018. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.