Skip to content

Conversation

@ewels
Copy link
Member

@ewels ewels commented Nov 7, 2025

Quick and dirty attempt at a quiz using the mkdocs-quiz plugin. Questions by Claude.

Seems to work out of the box pretty well.. Integrates nicely and inherits styling properly.

Thoughts on the mkdocs_quiz plugin

I immediately want to make some improvements to the plugin:

  •  No need for content: to be required when empty
  • Parse questions and answers as markdown
  • Option to show correct answer when wrong (rather than clicking each until it shows)
  • Option to submit on selection for single-answer questions (no need for a "submit" button)
  • Option to opt in to having quiz JS included on a page, not just opt out
  • Ability to track progress and score across the whole page
  • Progress + score tracker in right hand sidebar
  • Option to disable a question after initial submission (eg. show correct answer but don't allow original answer to be changed)
  • Related: Ability to start again / clear all answers on the paeg
  • Save progress in browser's local storage so that answers persist between page reloads
  • Plugin option to customise syntax for question title (so doesn't have to be a <h3>
  • Option to automatically number quiz questions down the page
  • Include question header id with hover links to link directly to a specific question

And maybe nicer syntax for writing questions:

  • Current syntax
    • <?quiz?>
      question: Are you ready?
      answer-correct: Yes!
      answer: No!
      answer: Maybe!
      content:
      <h2>Some additional content here</h2>
      <?/quiz?>
  • Proposed syntax
    • <?quiz?>
      Are you ready?
      - [x] Yes!
      - [ ] No!
      - [ ] Maybe!
      Some additional content here
      <?/quiz?>

I might chuck Claude at this list, see how it gets on.

@netlify /hello_nextflow/07_hello_quiz/

@ewels ewels marked this pull request as draft November 7, 2025 07:35
@netlify
Copy link

netlify bot commented Nov 7, 2025

Deploy Preview for nextflow-training ready!

Name Link
🔨 Latest commit a55be20
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-training/deploys/6915de77925bce0008f111bd
😎 Deploy Preview https://deploy-preview-694--nextflow-training.netlify.app/hello_nextflow/07_hello_quiz/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ewels
Copy link
Member Author

ewels commented Nov 8, 2025

Got a bit carried away.. 🙄 https://github.com/ewels/mkdocs-quiz

@ewels ewels marked this pull request as ready for review November 11, 2025 11:50
@ewels
Copy link
Member Author

ewels commented Nov 11, 2025

Ready for review - the updated quiz package ideally needs publishing on PyPI, but it should be stable enough for these docs to be published for now, so can come back to that.

Note that the questions need review before merging. Several are incorrect in their answers.

@ewels
Copy link
Member Author

ewels commented Nov 13, 2025

The mkdocs-quiz rewrite has been contributed back upstream and I'm now a maintainer 🎉

v1 (and v1.0.1) are now published on PyPI so we can use that directly: https://pypi.org/project/mkdocs-quiz/

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant