Skip to content

Implement a custom quiz admonition #30

Description

@razorblade23

Problem:

We need a quiz section, so rather then being just bland text questions, i would like to build out a custom component that will render the following markdown:

:::quiz
Q: What does `len()` return on a list?
- [ ] The last index
- [x] The number of items
- [ ] Nothing

Q: What does `list.append()` return?
- [ ] The list itself
- [x] None
- [ ] The appended item
:::

Into a quiz like section, where questions are bolded and answers are displayed as a checkbox, and when user clicks on the checkbox, it should show up green or red, depending on the correct answer.

For this to work, we need a custom syntax parser and remark plugin.

Multiple Choices

Component should support multiple correct choices.

Color style

Match the color to already built explore admonition - dark purple

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions