Skip to content

rladies-san-diego/2018-07-05_blogdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

This tutorial is roughly based on the blog post "Up and running with blogdown" by Alison Presmanes Hill.

Pre-tutorial To Do

To participate in the tutorial please have done the following:

  • Install R
  • Install RStudio
  • Run install.packages("blogdown") in R
  • Run blogdown::install_hugo() in R (for a Mac user recommended to have homebrew installed first)

If you want to push up the website:

Instructions to Build Website

  • Create a folder to hold the project
  • Open RStudio, go to Project —> New Project —> Existing Directory —> [navigate to the folder you just created] —> Create Project
  • Build the template of your site selecting a theme, we'll use the Academic theme create via blogdown::new_site(theme = "gcushen/hugo-academic", theme_example = TRUE)
  • Go to Tools —> Project Options —> Build Tools —> [uncheck Preview site after building] —> OK
  • To look at the current version of site run blogdown::serve_site()
  • Edit config.toml to display your name and any other changes you would like
  • Update content/home/about.md to your information
  • Write a new post, by running blogdown::new_post([TITLE], ext = “.Rmd”) and filling in the content as you would for writing a typical Rmd document
  • Look at the public folder at various points to see the rendered version of your website

Instructions to Upload the Website

  • Enable git in RStudio, Project Options —> Git/SVN —> Version control system —> Git —> [click yes]
  • Go to Git —> Commit and see the list of files
  • Add public/ to .gitignore
  • Commit the rest of the files
  • Go to GitHub and create a new repository
  • Scroll down to where it says ...or push an existing repository from the command line, copy the commands
  • Open a terminal in RStudio by going to Git —> [the cog symbol] —> Shell...; paste into the terminal the code you copied and run
  • Check that the repository on GitHub is updated with files
  • Go to Netlify and click New site from Git and choose GitHub
  • Choose the repository you just created
  • Check the configuration: 1) publish directory is public, 2) make sure HUGO_VERSION is the same as when you type hugo version in your terminal
  • Click Deploy site
  • To change the name (for free) go to Site Settings —> Site Details —> Change site name

About

Slides and README for blogdown tutorial on July 5, 2018.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published