Chapter 3 Build and Deploy

3.1 Building

You can build a PDF, epub, or HTML of the book. By default, we will use the gitbook style but there are others such as tufte.

An epub can converted to the older Kindle format (MOBI) using tools such as Calibre. For the newer Kindle File Format (.azw, .azw3, .kfx file formats) you can find and use other tools.

To build a book locally in RStudio, click Builds > Configure Build Tools... > Select desired output format.

Cmd+Shift+B builds the PDF, epub, or HTML.

Or, in the RStudio console, run bookdown::render_book("index.Rmd")

3.2 Deploying

3.2.1 GitHub pages

  1. Setup GitHub pages. See this blog
  2. Run bookdown::render_book("index.Rmd") in RStudio
  3. git add, commit, push

Now open the GitHub pages link and the book should be there. Open https://rishigoutam.github.io/bookdown-start/index.html

3.2.2 bookdown.org

Publish to bookdown.org via rsconnect

  1. bookdown::render_book("index.Rmd")

Open https://bookdown.org/google1/rishi-bookdown-start/