I am preparing slides for a course in Quarto using Revealjs.
How can I render two different versions of the presentation? One for the students (including tasks) and one for the presenter (including solution slides). I tried to use the following in the YAML:
params:
version: "student" # or "presenter"
and then conditionally render slides using
::: {.content-visible when-params.version=="presenter"}
## Solution to Task 2
2 + 2 = 4
:::
But independent of what is set as version
, the solutions are shown. What can I do alternatively?
Following the docs on conditional content you can achieve your desired result by matching on boolean meta data like so:
---
title: "Untitled"
format: revealjs
version:
presenter: false
---
## Task 2
::: {.content-visible when-meta="version.presenter"}
## Solution to Task 2
2 + 2 = 4
:::
And when set to true
: