Using Bookdown in RStudio and RStudio Connect

In order to publish bookdown successfully to RStudio Connect, RStudio has to identify that you're working with a book not a regular R Markdown document.
When publishing bookdown to RStudio connect, make sure that your primary Rmd file is called index.Rmd and contains this line in the YAML:
site: bookdown::bookdown_site
RStudio will recognize that you are dealing with a book, and two things will happen:
  1. The Build Pane will appear in RStudio with the option to build the book
  2. During push-button publishing, the dialogue will say "Publish website with source code" instead of "Publish document with source code", assuming you are using the default gitbook output. 
A similar process is used to publish R Markdown websites.


  • Avatar
    Richard Yang

    works great with this single line.