README.md

Deprecated - instead use https://bookdown.org/yihui/bookdown/ which is what this repo does, but way better

lpgitbook - "literate programming with gitbook"

The two commands (currently) to knit the book are

prepare_book_dir()

which will copy the directory at the same level with the name _temp_<dir>

and then edits all rmd files in YAML to have:

output:
  md_document:
    variant: markdown_github

Then

render_rmds_to_md()

renders each to markdown. After the markdown is rendered, the book is created in the _book directory in the newly created directory.

For example, a project with a folder sample_proj containing the Rmd files would be rendered as such:

Note the requirement for the trailing backslash for the dir (for now)

dir <- "sample_proj/"
book_dir <- prepare_book_dir(dir)
render_rmds_to_md(book_dir)

Then in the created directory from the command line (with gitbook installed in your path via node)

gitbook install
gitbook build

Will eventually move these to system calls but R isn't playing nice with my node path on windows for now.

under consideration

untested

node requirement

node/iojs are required to use gitbook, and can be installed globally from npm with:

npm install -g gitbook


dpastoor/lpgitbook documentation built on July 29, 2022, 1:13 a.m.