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.yml
tells what should be at navigation bar and it also determines the overall style.index.html
and other files that are linked by_site.yml
can further link to other files (namely sub contents).- run
render_site([file-name])
to generatehtml
file fromRmd
file. - add, commit, and push everything at the end of the day.
docs/
contains allhtml
files and be sure to enable Github Pages (docs/
mode).- put all
Rmd
files atrmd/
and in R terminal, runrender_site('rmd/filename.Rmd')
and it will generate the correspondinghtml
atdocs/
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.