Allison Hill’s YouTube tutorials

A series of instructions on how to deploy websites with Netlify using Rmd files.

Day 1 - Postcards

Postcards is a simple landing website, basic quick information about you and social media links.

Steps

  • install.packages('postcards')
  • go to GitHub, make a new repo with a README file and default settings.
  • copy the HTTPS hyperlink from the green button icon
  • in RStudio: File > Create Project > Version Control > Git (paste in the URL) > create project
  • in console: library(postcards)
  • in console: create_postcard(template= "NAME_OF_TEMPLATE")
  • this opens a index.Rmd file
  • knit the file, which makes a html file
  • commit and push all files to GitHub
  • log into Netlify, click open new site from Git > GitHub > type in name of repo > branch to main > deploy site > deploy progress (look for deployed) > click on link for preview
  • NOTE: every edit in the Rmd file MUST be knitted + commit + push file. Then refresh or redeploy site on Netlify. Website settings > change website name.

Day 2 - Distill & Postcard

Steps:

  • install.packages('distill')
  • library('distill') then restart RStudio session
  • go to GitHub make a new repo with README file
  • copy HTTPS from code button icon
  • in RStudio: File > Create Project > Version Control > Git (paste in the URL) > create project
  • in console: library('distill')
  • in console: create_website(title='TITLE')
  • a bunch of files and folders get made, the _site.yml has the core shell of website
  • commit & push files, then restart the RStudio session
  • now in RStudio there should be on right top side a Build tab which runs/ executes the website
  • Postcard part:
    • delete the about.Rmd file so a new one is created, commit & push files
    • postcards::create_postcard(template='TEMPLATE', file="about.Rmd")
    • in the about.Rmd file is created, click on Build then click on about in nav bar, commit & push files
  • log into Netlify, click open new site from Git > GitHub > type in name of repo > branch to main, publish directory: _site > deploy site > deploy progress (look for deployed) > click on link for preview
  • NOTE: every edit in the Rmd file MUST be finished with Build + commit + push file. Then refresh or redeploy site on Netlify. Website settings > change website name.

Day 3 - xaringan & markdown

Steps:

  • go to GitHub make a new repo with README file
  • copy HTTPS from code button icon
  • in RStudio: File > Create Project > Version Control > Git (paste in the URL) > create project
  • install.packages('xaringan')
  • library('xaringan')
  • restart RStudio session
  • RStudio > File > New File > R Markdown… > from template > Ninja Presentation
  • save file Rmd > knit it to make a html
  • commit & push files
  • log into Netlify, click open new site from Git > GitHub > type in name of repo > branch to main > deploy site > deploy progress (look for deployed) > click on link for preview
  • when you open the preview file not found but go to the url bar and add the file name to the url. <name_of_website>.netlify.app/ninja-pres-name.html
  • delete the ninja-pres-name.html and rename the pres-ninja-name.Rmd as index.Rmd and knit it, commit & push files
  • go to Netlify and in the url edit to have <name_of_website>.netlify.app/index.html or without the /index.html and should work
  • in RStudio: new folder > navigate to new folder > create new R markdown file > save as index.Rmd > knit it
  • in the Rmd file in yaml section, change output as output: xaringan::moon_reader then knit it

Day 4 - bookdown

Steps:

  • go to GitHub make a new repo with README file
  • copy HTTPS from code button icon
  • in RStudio: File > Create Project > Version Control > Git (paste in the URL) > create project
  • in console: install.packages('bookdown')
  • in console: library('bookdown')
  • in console: create_bs4_book(path=".")
  • bunch of Rmd files get made which are chapters of book
  • RStudio > Addins dropdown > Preview book

day 5 - blogdown