I often find myself building the Python page, then building the R page, and then going back to the Python page. The profile and variable config stuff works correctly for the initial Python page build, then switching to the R build, but the switching script does not get called when switching back from the R to the Python build (I assume the same is true the other way round).
So let's say I start with:
make ninja-config
cd source
The initial build works fine:
$ ninja ../python-book/significance.html
[25/34] ../scripts/set_version.py --output=_quarto-python.yml python
Writing configuration to _quarto-python.yml...
Writing _variables.yml...
...
[34/34] quarto render significance.Rmd --no-clean --to html --profile python
All good. Switching to the R build also works fine - including the Writing configuration ... stuff to switch versions:
$ ninja ../r-book/significance.html
[1/2] ../scripts/set_version.py --output=_quarto-r.yml r
Writing configuration to _quarto-r.yml...
Writing _variables.yml...
[1/2] quarto render significance.Rmd --no-clean --to html --profile r
So far, no problem. But now, if I switch back to the Python page build:
$ touch significance.Rmd
$ ninja ../python-book/significance.html
[1/1] quarto render significance.Rmd --no-clean --to html --profile python
Notice there is no Writing configuration ... step here - so the resulting built page uses the R variables written into _variables.yml, and because of that, the _common.R utilities will assume this is an R build, and filter out the Python blocks instead of the R blocks.
I often find myself building the Python page, then building the R page, and then going back to the Python page. The profile and variable config stuff works correctly for the initial Python page build, then switching to the R build, but the switching script does not get called when switching back from the R to the Python build (I assume the same is true the other way round).
So let's say I start with:
The initial build works fine:
All good. Switching to the R build also works fine - including the
Writing configuration ..
. stuff to switch versions:So far, no problem. But now, if I switch back to the Python page build:
Notice there is no
Writing configuration ...
step here - so the resulting built page uses the R variables written into_variables.yml
, and because of that, the_common.R
utilities will assume this is an R build, and filter out the Python blocks instead of the R blocks.I can work round this by running:
manually, but it would be good not to have to do that. Any insights?