I am using bookdown extensively in project work. That is, I have directories containing a multitude of Reports that all have homogeneous styling that is sourced from a shared src directory via the Rmd YAML header. (e.g. a style.css via css:, some javascript via in_header: and a footer.html via after_body:). The benefit of this is that I do not have to copy the same files everywhere because I can just source them.
With _bookdown.yml, however, this kind of sourcing via the YAML header does not seem to be an option. i.e. I need to place the same _bookdown.yml in every directory where I am rendering one of my reports. I would much prefer being able to specify a cental _bookdown.yml source and the YAML header seems like the obvious place to do this.
As a current workaround I am using file.copy(from = "../../../src/_bookdown.yml", to = ".", overwrite = TRUE) in the Rmd setup chunk to copy the _bookdown.yml from my src directory to the root of my current Rmd build. It works, but it seems less tidy than it could be.
This is a cross reference explicitly pointing out why I need to use _bookdown.yml in my setup: https://stackoverflow.com/questions/79726280/how-can-i-make-the-figure-xx-text-bold-and-the-description-text-regular-font
I am using bookdown extensively in project work. That is, I have directories containing a multitude of Reports that all have homogeneous styling that is sourced from a shared src directory via the Rmd YAML header. (e.g. a style.css via
css:, some javascript viain_header:and a footer.html viaafter_body:). The benefit of this is that I do not have to copy the same files everywhere because I can just source them.With
_bookdown.yml, however, this kind of sourcing via the YAML header does not seem to be an option. i.e. I need to place the same_bookdown.ymlin every directory where I am rendering one of my reports. I would much prefer being able to specify a cental_bookdown.ymlsource and the YAML header seems like the obvious place to do this.As a current workaround I am using
file.copy(from = "../../../src/_bookdown.yml", to = ".", overwrite = TRUE)in the Rmd setup chunk to copy the_bookdown.ymlfrom my src directory to the root of my current Rmd build. It works, but it seems less tidy than it could be.This is a cross reference explicitly pointing out why I need to use
_bookdown.ymlin my setup: https://stackoverflow.com/questions/79726280/how-can-i-make-the-figure-xx-text-bold-and-the-description-text-regular-font