GitHub is not only for source code.
Github has long been the de facto platform to share and publish open-source code, notwithstanding the fact that it is becoming a dedicated host for reproducible research; see, e.g., The benefits of reproducible research: a public health example.
Enter Gitbook, which offers a fast and elegant way to publish version-controlled ebooks online or as PDF/ePUB. Editing is done with the lightweight Markdown markup language. There is a dedicated editor for the Desktop and a pretty Documentation Center, which is itself a Gitbook, with associated Github source repository.
Interestingly, there is now an R package that allows to use inline bibliographic citations (with the knitcitations package) and the R Markdown language (knitr): Gitbook with R Markdown.1 I should say that I came across this project some months ago (apparently, in April, if I refer to my Twitter feed, see below) but I hadn't time to look at it seriously.
% grep gitbook *bag-of-tweets* 2014-04-30-bag-of-tweets-040.md:* jbryer: Some updates to Rgitbook #Rstats package adding support for knitcitations and other fixes for the update to gitbook. <http://t.co/wuHnoo61nq> (24 Apr) 2014-04-30-bag-of-tweets-040.md:* jbryer: New Rgitbook #Rstats package available <http://t.co/xLZw5fYgwr> @GitBookIO (22 Apr)
For what is worth, the current master branch will not work on OS X with the latest node.js/npm programs. This is because in
checkForGitbook.R there is an instruction that reads
if(system('npm', ignore.stdout=TRUE) != 0), which clearly doesn't work with node.js > 0.10 (
system() will return 1 in this case). Several patches were proposed but none have been integrated in Jason Bryer's branch. So, I installed
renkun-ken/Rgitbook version, which fixed the issue. ↩︎