How to update the (new hugo-based) website

April 2, 2017    website    commandline    R-notes   

Note to Self

Rebuild website

All of this happens in R with the blogdown package.

library(blogdown)

setwd("~/dropbox/academia/website/hugo-sustain")

options(servr.daemon = TRUE)

serve_site()

Push to github

Three simple commands (after cd-ing into the correct folder, which is the public folder in the hugo-sustain website folder)

  • git add .
    • this adds the files to the git repo
  • git commit -m "blah"
    • where “blah” is some reasonable comment
    • this commits the changes to the local repo
  • git push origin master
    • this pushes the data to github where it can be served

Got a lot of help setting this up here: https://github.com/whipperstacker/blog/blob/master/content/post/deploying-a-hugo-site-to-github-pages.md

Add new research paper

(Because this is something I should do a lot of!)

  • Add a new markdown file to content/papers/
  • Add the pdf to static/research/pdf/
    • And NOT to the folder in the public folder because that is what gets generated by blogdown
  • Add the title to the research.md file in the content folder