Closed gadenbuie closed 3 years ago
I just pushed two more commits. 1c8a2f7
(#2) refactors build_all()
to simplify the nested if...else structure. Again, let me know if I missed a detail there.
I also added the cli package to report build progress:
> build_all("inst/example/slides.Rmd", c("html", "gif"))
✓ Building slides.html from slides.Rmd ... done
✓ Building slides.pdf from slides.html ... done
✓ Building slides.gif from slides.pdf ... done
Awesome, thanks for these quick fixes! Particularly appreciate the {fs} suggestion - I wasn't super happy with the DescTools dependency but didn't know of a better solution for handling the file path problems.
This is a bit of an entangled PR with a few relatively minor changes.
xaringan_to_pdf()
, so I moved it too.xaringan_to_pdf()
because you mentioned animations may cause blank slides, although I found that the source of that problem is likely slide continuations. In any case, 1s is safer.include_partial_slides
toxaringan_to_pdf()
, which controls whether partial/continued slides are included in the PDF.build_*
functions, namely to useinput
andoutput_file
file://
and I also added checks to make sure we're looking at xaringan slides before printingAnd finally, I replaced DescTools with functions from fs. DescTools is a fairly big package with a reasonable number of dependencies. fs specializes in working with paths across all systems and is commonly used in the tidyverse/rmarkdown ecosystem so it's very likely to already be installed.
I'm pretty certain I didn't break anything with the last change, but please give it a look to make sure I wasn't missing a critical detail.