This is a light template for documentation based on rmarkdown.
This is based on rmarkdown. As a quick look at how things work, the way the documentations glued together is:
_site.ymltells what should be at navigation bar and it also determines the overall style.index.htmland other files that are linked by_site.ymlcan further link to other files (namely sub contents).- run
render_site([file-name])to generatehtmlfile fromRmdfile. - add, commit, and push everything at the end of the day.
docs/contains allhtmlfiles and be sure to enable Github Pages (docs/mode).- put all
Rmdfiles atrmd/and in R terminal, runrender_site('rmd/filename.Rmd')and it will generate the correspondinghtmlatdocs/
All you need to get started is the files in rmd/. Once you get them, do the following in R terminal:
setwd('some_path/template_r_documentation')
library(rmarkdown)
render_site(input = 'rmd/')
To render a new file, say new.Rmd, do:
render_site(input = 'rmd/new.Rmd`)
This is a super light and lazy (quick) solution. It is inspired by this post and workflowr. To get a more advanced and prettier solution, please check out workflowr.