Installation
Now that you have some files, it’s time to build the HTML page for your quiz.
<!DOCTYPE html>
<html>
<head>
<title>A worksheet</title>
<script src="https://scripts.compsci.rocks/quiz/latest/mdq.min.js"></script>
</head>
<body>
</body>
</html>
The link https://scripts.compsci.rocks/quiz/latest/mdq.min.js will pull the latest version from our CDN. You can also download the mdq.min.js file from the dist folder in this repo if you’d rather self host it. But feel free to use the CDN link. That way you’ll always have the latest version.
You’ll also need to initialize the script. Somewhere in your file, probably towards the bottom, you’re going to call the init function.
<script>
let config = {}; // more on this in a bit
new MDQ(config);
</script>
You can have multiple new MDQ({}) calls in your file, as long as the parent property in config is different.