Git Product home page Git Product logo

hugo-quiz's Introduction

hugo-quiz

build and deploy

A hugo shortcode for writing quizzes with a markdown-like syntax, called quizdown.

๐Ÿš€ See the demo based on the hugo learn theme or try the interactive quizdown live editor.

  • supports markdown text formatting, images and syntax highlighting.
  • different quiz-types: single-choice, multiple-choice, sequence.
  • support for hints and explanations.
  • options for color theme, question shuffling, localization.
  • mobile friendly with touch support for all question types.

Installation

  1. Copy the content from demo/layouts/shortcodes/quizdown.html into your local layouts/shortcodes/ folder.
  2. Add the quizdown.js to your project. For the hugo-learn theme you can copy the content of demo/layouts/partials/custom-header.html into your local layouts/partials/ folder.

Currently, the --minify flag of the hugo command causes issues with the raw quizdown-markdown code. Please remove the flag when building your website or use the following option in your config.toml:

[minify]
  disableHTML = true

Usage (edit example in ๐Ÿš€ quizdown editor)

Write quizzes in plain markdown in any of your files in the content directory:

# Hugo Quiz

{{< quizdown >}}

---
primary_color: orange
secondary_color: lightgray
text_color: black
shuffle_questions: false
---

## The sound of dog

---
shuffle_answers: false
---

What do dogs sound like?

> Some hint

- [ ] yes
- [ ] no
- [ ] `self.sound = "meow"`
- [x] wuff

## Put the [days](https://en.wikipedia.org/wiki/Day) in order!

> Monday is the *first* day of the week.

1. Monday
2. Tuesday
3. Wednesday
4. Friday
5. Saturday  
{{< /quizdown >}}

๐Ÿ“š Documentation

The quizzes are for fun and not for serious assessment. Since everything is rendered on the client side, the hints and solutions to the questions become visible once javascript is disabled in the browser.

Check out the documentation on the main project page. You might be interested in:

Demo

Tested with version 0.80.0 of Hugo and the Hugo Learn theme.

Visit https://bonartm.github.io/hugo-quiz/ for a live demo based on the hugo-learn theme. You can also view a local version of the demo.

First download the theme:

git submodule update --init --recursive

Then start the server:

cd demo
hugo server -D

hugo-quiz's People

Contributors

bonartm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.