When render_new_rmds_to_md() or rerender() is run, the default option is to set this to FALSE, but if solution = TRUE, then the full_version parameter is flipped to TRUE and the practical is built and placed into the content/solutions directory and the links are all re-directed to ../post so that images and widgets aren't duplicated.
One caveat here:
If you want to go with this method, you must not use params as a variable. Knitr does not know how to parse the special params variable it created and one you created.
This will add the possibility for solutions to be created.
For example, the person writing a practical can have the parameter
full_version: true
in their practical YAML:https://github.com/reconhub/learn/blob/684e1ae38c795ce423501cc56db04471f8b2761f/content/post/practical-real-time-response-1.Rmd#L14-L15
When
render_new_rmds_to_md()
orrerender()
is run, the default option is to set this to FALSE, but ifsolution = TRUE
, then thefull_version
parameter is flipped to TRUE and the practical is built and placed into thecontent/solutions
directory and the links are all re-directed to../post
so that images and widgets aren't duplicated.One caveat here:
If you want to go with this method, you must not use
params
as a variable. Knitr does not know how to parse the special params variable it created and one you created.