I've created a document with a parameter called solutions that can be either true or false. I can use this to control whether solutions are displayed to the exercises in the document. This is all working just fine, but I'd also like the HTML file that is rendered to have a different name depending on the value of this parameter. If my file is named foo.Rmd, I'd like the output to be either foo.html or foo-sols.html depending on the value of the parameter. But I can't seem to get that to work.
Is there an easy way to do this that I'm missing?