Before you start

Set Up GitHub

  • Follow the pages directions
  • Create a repository in the browser called username.github.io
  • Clone the repository using the “Set up in Desktop” button

Test your GitHub

  • Create an index.html file in the repository folder on your computer

  • Commit and publish, then go to [username].github.io to make sure things are working.

  • When you know it is working, delete the .html file.

R Studio

  • Create a new project in an existing folder, house it in your Github repository local folder
  • Run rmarkdown:::site_skeleton(getwd())


  • In the .yml file, insert after the first line:

output_dir: “.”

  • Save the .yml file

  • rmarkdown::render_site()

  • Commit and push in Github Desktop

Edit your pages

  • index.rmd: your homepage
  • _site.yml: the structure of the website
  • whatever other files you want

This is just an R Markdown file. Pretty much anything you can do in an R Markdown, you can do here (though no Shiny embedding).

Don’t know markdown? R Markdown Cheat Sheet

Knit and publish

  • When you are done editing your R Markdown files, in the terminal type:


  • Then, check and see if they worked locally
  • Commit and push through GitHub desktop


You now know one of the nerd secret handshakes.

  • Add a new page - just make a new .rmd, then and add the .html to the .yml
  • Add slick icons
  • Add a TOC to a page
  • Embed R or Python code chunks and output