12.6 Publishing

You can generate books for both physical and electronic distribution. This section outlines some of the main options.

12.6.1 RStudio Connect

The easiest way to publish books online is through https://bookdown.org, which is a website provided by RStudio to host your books for free. Books can be pushed to this website by using bookdown::publish_book(). You will need to sign up for an account at https://bookdown.org/connect/, and your login details will be used to authorize bookdown the first time you call the publish_book() function.

12.6.2 Other services

You can host your book online with many other web services, such as Netlify or GitHub (via GitHub Pages). Because the output from bookdown::render_book() is a collection of static files, you can host them using the same methods of hosting normal web pages.

12.6.3 Publishers

You can consider publishing physical copies of your book with a publisher or using self-publishing. Many publishers provide LaTeX style classes that can be used to set the overall appearance of the book, and these can be used easily by setting the documentclass option in the YAML metadata of index.Rmd. Further customization of the appearance of the PDF book can be achieved by altering the LaTeX preamble via the includes: in_header option of bookdown::pdf_book.