The extension enables adding multiple choice questions when using a Quarto HTML documents or Quarto revealjs presentation. It also adds Alpine.js javascript framework to the document.
To install the extension with the template do:
quarto use template nareal/naquiz
To install the extension without the template do:
quarto add nareal/naquiz
This will install the extension under the _extensions
subdirectory.
If you're using version control, you will want to check in this directory.
To update the extension use:
quarto update extension nareal/naquiz
and to remove it:
quarto remove extension nareal/naquiz
To use the extension simply add it as a filter to the YAML header of the quarto document, for example:
---
title: "naquiz Example"
filters:
- naquiz
---
:::::{.question}
Bill Gates was the founder of:
::::{.choices}
:::{.choice}
Apple
:::
:::{.choice .correct-choice}
Microsoft
:::
:::{.choice}
Facebook
:::
:::{.choice}
Google
:::
::::
:::::
Here is the source code with usage examples: example.qmd and the rendered HTML page.
Here is the source code for an example of usage with revealjs presentation: example_presentation.qmd and the rendered HTML page.