01: Set up

How to prepare to make a new Hugo website (for real).

By Alison Hill in setup

May 26, 2021

tl;dr

To start, you’ll need the following in place (all are free):

To set these up for the first time, read on.

Install R and RStudio

For a pep talk about getting current on these installations, please read: https://happygitwithr.com/install-r-rstudio.html

  • Install a recent version of R (>=3.6.0), which is available for free at https://cloud.r-project.org/. Check your current version:

    R.version.string
    
  • Install a recent version of the RStudio Desktop Integrated Development Environment (IDE version >= 1.4), available for free ( RStudio Desktop Open Source License). Check your current version:

    # install.packages("rstudioapi")
    rstudioapi::getVersion()
    

Create a GitHub account

Sign up for a free GitHub.com account at https://github.com/join if you don’t already have one.

Complete these installation instructions:

Did it all work? Check that this works:

# install.packages("usethis")
usethis::git_sitrep()

Connect RStudio to your GitHub

We assume the following:

  • You have installed/updated R and RStudio.

  • You have a free GitHub account.

  • You have installed Git.

  • You have introduced yourself to Git.

  • You have confirmed that you can push to / pull from GitHub from the command line.

Next, follow these steps to test your connection to GitHub from RStudio:

Sign up for Netlify

Netlify is a platform that offers cloud hosting and serverless backend services for static websites. Lucky for us, that is what we need- we’ll be making a static websites. Netlify has a free plan tier, which in my experience is plenty for personal websites. To sign up:

  1. Sign up on https://app.netlify.com/signup.

  2. Select to sign up using your existing GitHub account (no need to create another account), so select “GitHub” (you may need to sign in), and click to “Authorize Netlify.”

Install blogdown

We’ll use the blogdown package to make a Hugo website from the comfort of RStudio. Install by connecting to the internet, opening RStudio, and running at the command line:

> install.packages("blogdown")

Restart your R session before using any newly installed packages 😄

Install Hugo

We’ll use Hugo to build our site. Use the blogdown package to install Hugo:

> blogdown::install_hugo()

And ensure your current version is at least as high as:

> blogdown::hugo_version()
[1] ‘0.80.0

Markdown review

Please complete this 10-minute interactive tutorial on Markdown.

You made it!

With all this preparation in place, you are ready to create your site