If you use R Markdown for data analysis projects, you might like to put your HTML reports on the web for people to look at. It would be nice if those pages were closely tied to your GitHub repository, but HTML pages render as code on GitHub proper. So this repository is a template for making a GitHub pages version of your analysis. Not that you have to use GitHub pages: you could just as easily rsync your HTML files anywhere else that you want.
For example, here is the table of contents for rendered versions of every R Markdown document in this repository.
As little as possible. The aim is to be very lightweight. But it does do this:
.Rmdfile in the root directory of your project.
If you want to get fancy, you can add these two lines to the
[remote "origin"] section of your
.git/config file, so that any
git push command will push to both the
master and the
gh-pages branch. Or you can just rename
gh-pages. (This tip from Brett Terpstra, who gives more details.)
push = +refs/heads/master:refs/heads/gh-pages push = +refs/heads/master:refs/heads/master
Don’t forget to commit the HTML files that you generate.