I've thought it should be so. However, setting params in the index.Rmd works only for the rendering book with the "merge and knit" approach. Probably because with "knit and merge" each .Rmd knitted in a fresh session the params from the index header also get washed away.
I've just tried to put params in _output.yml, but I can't make it work in both rendering approach. In minimal book example I've added params to _output.yml and call it in index.Rmd. Build is stopped with error.
This is _output.yml with 3 last lines added by me + I changed link title from "A Minimal ..." to "My Minimal..." just to confirm that file is actually accessed during the build.
bookdown::gitbook:
css: style.css
config:
toc:
before: |
<li><a href="./">My Minimal Book Example</a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
edit: https://github.com/USERNAME/REPO/edit/BRANCH/%s
download: ["pdf", "epub"]
bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
bookdown::epub_book: default
params:
refresh_rds: false
refresh_imagej: true
Then in index.Rmd I've added simple chunk just after # About header (w/o backslash at the last line):
```{r include=TRUE, echo=TRUE}
params
\```
When same params setted in the header of index.Rmd it works perfectly.