13.5 “wowchemy/starter-academic”
# The whole setup can be condensed into the following part:
::install_github("rstudio/blogdown")
remotes::create_project()
usethis::new_site(theme = "wowchemy/starter-academic")
blogdown::serve_site()
blogdown::new_post(title = "Hi Hugo",
blogdownext = '.Rmarkdown',
subdir = "post")
::use_git()
usethis::use_github() # requires a GitHub PAT usethis
- Information are taken from
- Xie, Y., Thomas, A., Presmanes Hill, A., 2018. blogdown - Creating Websites with R Markdown. CRC Press, Boca Raton.
- Allison Hill blog
- Setup a profile for the page with
blogdown::config_Rprofile()
this will execute a special setup at every beginning
options(
# to automatically serve the site on RStudio startup, set this option to TRUE
blogdown.serve_site.startup = FALSE,
# to disable knitting Rmd files on save, set this option to FALSE
blogdown.knit.on_save = FALSE, #<- change
blogdown.author = "Alison Hill", #<- add
blogdown.ext = ".Rmarkdown", #<- add
blogdown.subdir = "post" #<- add
)
config.toml
= Global settings for the pageblogdown::serve_site
= LiveReload is implemented and the site is built. You can preview in the viewer pane (the function is analogue toblogdown::build_site()
)- This blocks the console, meaning that you will not be able to use your R console once you start this local web server.
- publishing directory (by default, public/ ). Your website will be generated to this directory, meaning that you do not need to manually add any files to this directory.
- All files are written in R markdown and knitted to a markdown document. Hugo is a static site generator and does not know how to transform .Rmd or .Rmarkdown documents into .HTML