-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun_webpage.R
42 lines (30 loc) · 1.11 KB
/
run_webpage.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
## Compile Webpage and push it to rladieslausanne.github.io
## =========================================================
## installation here: https://bookdown.org/yihui/blogdown/installation.html
#install.packages("blogdown")
## Or, install from GitHub
#if (!requireNamespace("devtools")) install.packages("devtools")
#devtools::install_github("rstudio/blogdown")
#blogdown::install_hugo()
library(blogdown)
## >> creates new website, but because we have ours already, don't do that :-)
## blogdown::new_site(theme = "yihui/hugo-xmin")
## 1) if you want a new post:
#new_post(title="A first post using blogdown", kind = ".Rmd")
## 2) update website
## ---------------------------
blogdown::hugo_build()
## 3) go to a terminal
## ---------------------------
path <- getwd()
comment <- '"Add meetup link 3rd Dec"'
## b) commit changes of webpage folder
## add files system("git add ...")
system(paste0("git commit -a -m ", comment))
system("git push")
## a) commit changes to github
setwd("../../rladieslausanne.github.io/")
system("git add -f *")
system(paste0("git commit -a -m ", comment))
system("git push")
setwd(path)