rstudio-education / arm-workshop-rsc2019

Materials for the rstudio::conf 2019 Advanced R Markdown workshop
https://arm.rbind.io
Creative Commons Attribution Share Alike 4.0 International
114 stars 55 forks source link

Bookdown question #11

Closed apreshill closed 5 years ago

apreshill commented 5 years ago

Hi @yihui,

One thing I have run into pulling together teaching materials for bookdown is that if my book won't render, I end up with all the intermediate files in my root project directory. Is there a way to direct those files into a folder just in case of failure to render? It makes it hard to clean up your project directory if the book fails to render. An example for me was trying to work with Jenny's Happy Git with R book- I had to edit one chapter to make the book render, but then I had to manually delete all the intermediate files that cluttered up my project directory. I searched GitHub issues and the documentation and have asked around- no one has any ideas!

Thanks- Alison

yihui commented 5 years ago

What kind of intermediate files did you see? Like *.utf8.md? These files should be automatically cleaned up once the book can be successfully rendered.

new_session: true will generate more intermediate files than the default new_session: false: https://github.com/jennybc/happy-git-with-r/blob/master/_bookdown.yml#L6

apreshill commented 5 years ago

Ah good to know! Yes all the .md files were there- I assumed it cleaned up the old files in the output directory, but didn't realize those in the project root would also get cleaned up.