I am wondering if anyone can help me work through the following two questions about
bookdown. Let's use
gitbook() as the example format, to make things clear.
post_processor()method for the
verboseas arguments, however, the
outputis not actually the final output file(s) but rather the HTML file before splitting (i.e.
_main.html, by default). I am wondering if bookdown exposes the actual final filenames anywhere in the rendering process such that these split HTML files can be post-processed.
The second issue I'm facing is that even exposing
post_processor()is of limited use because this file actual lives in whatever directory is specified by
bookdown::render_book(output_dir = ...), which is
_book/, by default.
So even if I force the gitbook to be a single file by specifying
gitbook(split_by = "none"), I can't safely post-process this file (
output) without knowing the subdirectory it lives in. Does
render_book() expose any meta data that can be used in the post-processor to learn the
output_dir and paste it together with
output to form the proper relative path??
Thanks for your help!!
EDIT: Putting this code in the
meta <- as.list(parent.frame()) does allow me to see a whole bunch of the rendering meta data, such as
output_dir is shown as
".", even though the HTML files are saved in