Some quick notes on how this blog was created…

It was built using the R blogdown package, which is based on the Hugo static site generator. To get started, I followed Kevin Wong’s excellent tutorial “Blogging with R Markdown”.

I decided to host the static site output on GitHub Pages. This should have been easy, but I made a bunch of mistakes along the way because I didn’t read carefully enough. Some key points:

  • Create a new GitHub repository in the format yourusername.github.io.
  • On your computer, initialize a local repo (git init) in the public subfolder of the directory you chose as the root for blogdown.
  • Connect your local repo to the repo you just created on GitHub: git remote add origin https://github.com/yourusername/yourusername.github.io.git

I write posts as .Rmd files in R Studio, but I manage pushing content to GitHub Pages using Git Bash. When I’m happy with the local copy of my website generated by blogdown, I push to GitHub Pages using the following commands (again, from the “public” folder):

  1. git add .
  2. git commit -m "added a new post"
  3. git push

There are some more things I could add related to the config.toml options and theming, but that will have to wait for another post.