Experimental package implementing the targets pipeline for bookdown projects as shown in this demo by @jdtrat. There are no promises this will be submitted to CRAN.
install.packages("bookdowntargets", repos = c("https://mps9506.r-universe.dev", "https://cloud.r-project.org"))
This package has one function: tar_render_book(). This is a drop in
replacement for
tarchetypes::tar_render()
but points to a directory with bookdown files.
Note that tar_render_book() tracks dependency files (_output.yml,
_bookdown.yml) and these files are expected to be in the same
directory as the index.Rmd file. Targets should also track changes in
.bib, .lua, or other files in the same directory that if changed,
will result in tar_make() running the target again.
library(targets)
library(bookdowntargets)
list(
tar_target(dataset, data.frame(x = letters)),
tar_render_book(report, path = "report_directory")
)