I've created a header.html file that I want to be inserted in the <head>...</head> section of each of my chapters, not just the first chapter. My YAML has the following:
Did you define that in _output.yml file ? If so, it should apply to all Rmd file, so all chapter. In a small test I have just done with bookdown-demo, it works correctly and this is applied in all headers.
Oops. Yeah. I got the name wrong. Was going off memory. I’m assuming he made the same mistake I did and put it in with the other yml code in index.rmd that is there in the bookdown demo. I only figured out it had to go in _output via trial and error when it didn’t work to put it in index.
I haven’t figured out the difference between what should go in each place. Can I just get rid of the yml in index and put all the config in _output.yml? Why is it split into two places?
hum... good question. A design choice for now. _output.yml can serve to define formats and its options for all the Rmd rendered in a project. You can replace any output: from your Rmd header by this file. However, the YAML header of an Rmd also contains other information for pandoc to work with, (like title:, date:, ...), and I don't think you could put that in the _output.yml - they are more document related than project related.