Skip to main content

A MkDocs plugin to create interactive quizzes in your markdown.

Project description

MkDocs Quiz Plugin

PyPI version PyPI - Downloads Python versions License

A modern MkDocs plugin to create interactive quizzes directly in your markdown documentation. Perfect for educational content, tutorials, and documentation that requires user engagement.

📚 Documentation and examples: https://ewels.github.io/mkdocs-quiz/

Features

  • Simple markdown syntax - Create quizzes using GitHub-flavored markdown checkboxes
  • 🎯 Multiple quiz types - Single choice (radio), multiple choice (checkboxes), and fill-in-the-blank
  • Instant feedback - Visual indicators show correct/incorrect answers
  • 📊 Progress tracking - Automatic progress sidebar and results panel, with confetti 🎉
  • 💾 Results saved - Answers are saved to the browser's local storage
  • 🌐 Internationalization - Quiz elements support multi-lingual sites
  • 📤 LMS Export - Export quizzes to QTI format for Canvas, Blackboard, Moodle
  • 🖥️ CLI Quiz Runner - Take quizzes in your terminal, from local files or website URLs

[!TIP] Check out the documentation to see the plugin in action.

<quiz>
What's the best static site generator?
- [x] mkdocs
- [ ] Jekyll
- [ ] Sphinx

If you entered mkdocs, you've come to the right place!

![Random cat photo](https://cataas.com/cat)
</quiz>
mkdocs-quiz

Installation

Install the package with pip:

pip install mkdocs-quiz

Quick Start

1. Enable the plugin

Add the plugin to your mkdocs.yml:

plugins:
  - mkdocs_quiz

2. Add your first question

Create a quiz with radio buttons (only one correct answer):

<quiz>
What is 2+2?
- [x] 4
- [ ] 3
- [ ] 5

Correct! Basic math is important.
</quiz>

Use - [x] for correct answers and - [ ] for incorrect answers. If multiple answers are correct, checkboxes instead of radio buttons will be shown (the user has to select all correct answers).

3. Intro text and results

Insert these placeholder comments for some intro text with a reset button and a final results panel (which shoots confetti when you finish):

<!-- mkdocs-quiz intro -->

..quiz content here..

<!-- mkdocs-quiz results -->
mkdocs-quiz

CLI Quiz Runner

Take quizzes directly in your terminal:

# Interactive mode - select from discovered quizzes in the current repository
# (you can also use `mkdocs-quiz` instead of `quiz`)
quiz

# Run from a website URL
quiz run https://ewels.github.io/mkdocs-quiz/multiple-choice/

# Run a specific file
mkdocs-quiz run docs/quiz.md

CLI Demo

See the CLI Runner documentation for more details.

Contributing

Contributions are welcome! Please see the contribution guidelines for details.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Credits

Changelog

See CHANGELOG.md for version history and changes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_quiz-1.6.0.tar.gz (102.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_quiz-1.6.0-py3-none-any.whl (93.7 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_quiz-1.6.0.tar.gz.

File metadata

  • Download URL: mkdocs_quiz-1.6.0.tar.gz
  • Upload date:
  • Size: 102.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mkdocs_quiz-1.6.0.tar.gz
Algorithm Hash digest
SHA256 a24a17f851365cfc8616abb16e7f0c61ca5da5b21f91838df66639ebfef8549e
MD5 04af780ddea003f30f488b4c6b87e2d2
BLAKE2b-256 5b4f4d9afd0b74ebd44c4369b102a2e2e772daacff5805a5cd8cd7cfdadc1264

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_quiz-1.6.0.tar.gz:

Publisher: publish.yml on ewels/mkdocs-quiz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_quiz-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_quiz-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 93.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mkdocs_quiz-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67e062d7c89110ba52586af8f073c8b9b5735b99789075cb0bc524de4c6b5ea3
MD5 e3b1ff66688d83a938d49ddefd6cf9ee
BLAKE2b-256 ec93b42a37ee0feeddfc3439d394316a129d9eaa892403107b5eaa9f6562bb9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_quiz-1.6.0-py3-none-any.whl:

Publisher: publish.yml on ewels/mkdocs-quiz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page