0

We are developing content over several repositories on github and we would also like to get a book using bookdown. Is it possible to tell bookdown to include markdown files accessed via a specific http link ?

Or do we have to create a code that would download the files first on the book repo and create the book afterwards ?

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
Julien Colomb
  • 508
  • 4
  • 20
  • Have you tried using the [`child`](https://yihui.name/knitr/options#child-documents) chunk option with an URL? – Ralf Stubner Aug 12 '19 at 09:56
  • Even if you find such a method, I believe it essentially boils down to downloading. I recommend that you write a function by yourself since it shouldn't be hard (something like `cat(readLines('http://...'), sep = '\n')` or `download.file()` plus `readLines()`). – Yihui Xie Aug 12 '19 at 14:12
  • I am indeed trying now with download.file (mdfilepath,md_filename) followed by bookdown::render_book("index.Rmd") (no need of readlines). I was lucky the dependencies (images) were coded with absolute path. (https://github.com/OpenScienceMOOC/book/blob/dev_JC/Update_book.r) – Julien Colomb Aug 14 '19 at 13:55

0 Answers0