Skip to content

Using metadata values to control the visibility of slides #10487

Answered by mcanouil
ellafm asked this question in Q&A
Discussion options

You must be logged in to vote

That's how it is documented and how this feature works: https://quarto.org/docs/authoring/conditional.html

Note that in this case I would use profile. https://quarto.org/docs/projects/profiles.html

---
title: "Some title"
author: "An author"
engine: markdown
format: 
  revealjs:
    theme: default
---

## First slide

Some content

::: {.content-visible when-profile="answer"}
## Second slide

This slide will be hidden unless `answer_slides` is set to `true`
:::
quarto render index.qmd
quarto render index.qmd --profile answer --output with-answers.html

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ellafm
Comment options

You must be logged in to vote
2 replies
@mcanouil
Comment options

mcanouil Dec 8, 2024
Collaborator

@mcanouil
Comment options

mcanouil Dec 8, 2024
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
revealjs Issues with the revealjs format
3 participants