Steps to create website with blogdown and the Hugo Academic (Wowchemy) theme
These are the steps that I took to set up my website using blogdown and the Hugo Academic (Wochemy) theme. I also did a little “how to” session with some GW political science graduate students where we worked through these steps and got everyone started with a blogdown site. Many of the steps recounted here are based on what I learned from this super-helpful post by Alison Hill.
Open a GitHub account and set up a personal access token (PAT) in R using
usethis::create_github_token(). Consult Happy Git and Git Hub for the UseR for more details.
Create a Github repository. Initialize the repository with a
READMEbut don’t worry about adding
.gitignoreor a license.
Go to your new repository and click on the green button that says Code. Choose HTTPS (the default) and click on the clipboard to copy the link.
Open RStudio. Navigate to
File > New Project > Version Control > Gitand paste the URL from step 3 into the Repository URL: field. Browse to a location where you want to store the project and click Create Project.
Install blogdown (
Create the site:
library(blogdown) new_site(theme = "wowchemy/starter-academic"
yto let blogdown star the server and get a local preview. In the future, you can use
blogdown::stop_serverto stop the server and
blogdown::serve_siteto restart it.
Check content using
blogdown::check_content()and fix any issues.
Commit changes with
usethis::use_git()and push them to GitHub using the little green arrow in RStudio’s Git window.
Publish the site to Netlify. Sign up using your GitHub account, then log in and select
New site from Git > Continuous Deployment: GitHub. Select the repository with your site and deploy it!