#' @title Publish my notes
#' @description Function renders and uploads notes to server
#' @author Jani Miettinen <jani.k.miettinen@gmail.com>
#' @rdname pubMYNOTES
#'
# Publish my notes
pubMYNOTES <- function(){
if(dir.exists("//Volumes/public/webpage/") & dir.exists("~/RKoti/dokumentit/mynotes/")){
curWD <- getwd()
setwd("~/RKoti/dokumentit/mynotes/")
rmarkdown::render_site()
system("rsync -arv --delete ./_site/ //Volumes/public/webpage/")
setwd(curWD)
}else{
print("Server is offline.")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.