Skip to content

Instantly share code, notes, and snippets.

@tanho63
Last active August 4, 2020 12:51
Show Gist options
  • Save tanho63/97adf9cc84d2ff97d150c72cbdc52e0c to your computer and use it in GitHub Desktop.
Save tanho63/97adf9cc84d2ff97d150c72cbdc52e0c to your computer and use it in GitHub Desktop.
Build bookdown as epub
#### Convert bookdown to epub ####
library(devtools)
## Clone to folder
book_repo <- "hadley/adv-r"
dest_folder <- "~/documents/github"
usethis::create_from_github(book_repo,dest_folder,TRUE,protocol = "https")
# (Now manually open the .rproj file)
## Install packages
devtools::install_deps() # cross fingers and apply debug where necessary
## Bookdown to epub
bookdown::render_book(input = "index.rmd", output_format = bookdown::epub_book()) # cross fingers (and prepare pest control)
# epub should appear somewhere (_book in this case, I think) after it builds all the way
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment