You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've struggled with this for a day or so. I'll give some context and what I've tried.
The goal is to have a "questions" and "solutions" version of a tutorial, both generated from the same .qmd file, the difference is that a parameter is switched and in the file the solution is either rendered between questions or not rendered. The solutions HTML file has a different file name to the questions HTML (the questions HTML gets the default file name).
I can do this fairly straightforwardly using quarto::quarto_render() including setting the parameters and output file names, my challenge is how to keep both versions of the page when rendering the website.
When I run quarto::quarto_render() individually for the question and solution, both get copied into the _site folder but when I click "Render website" the website forgets about the solutions HTML file.
I've tried:
specifically excluding these qmd files from the project: render: list but then they don't inherit the formatting and don't "belong" to the website
including the files explicitly using the project: resources: list but the solutions are "forgotten" each time the Render Website is run
playing around with freeze: true but this doesn't seem help with the solutions file.
What could work is a way to keep the HTML files in the original (staging) directory rather than having them be moved across to the _site directory and then deleted (but I haven't worked out how to do this).
A work around seems to be to recompile all the questions and solutions after running "Render website" but this is very computationally expensive and I'd like to avoid that.
staleIssues open for 30+ days without providing a "working" reproducible example
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've struggled with this for a day or so. I'll give some context and what I've tried.
The goal is to have a "questions" and "solutions" version of a tutorial, both generated from the same
.qmdfile, the difference is that a parameter is switched and in the file the solution is either rendered between questions or not rendered. The solutions HTML file has a different file name to the questions HTML (the questions HTML gets the default file name).I can do this fairly straightforwardly using
quarto::quarto_render()including setting the parameters and output file names, my challenge is how to keep both versions of the page when rendering the website.When I run
quarto::quarto_render()individually for the question and solution, both get copied into the_sitefolder but when I click "Render website" the website forgets about the solutions HTML file.I've tried:
project: render:list but then they don't inherit the formatting and don't "belong" to the websiteproject: resources:list but the solutions are "forgotten" each time the Render Website is runfreeze: truebut this doesn't seem help with the solutions file.What could work is a way to keep the HTML files in the original (staging) directory rather than having them be moved across to the
_sitedirectory and then deleted (but I haven't worked out how to do this).A work around seems to be to recompile all the questions and solutions after running "Render website" but this is very computationally expensive and I'd like to avoid that.
Any suggestions would be very welcome!
Beta Was this translation helpful? Give feedback.
All reactions