Shortcodes

Most content on the MWC site is written in Markdown, a simple text format which Zola processes into pages on the built site. Shortcodes provide a means of authoring richer content from within Markdown. Making with Code uses custom shortcodes to implement a consistent pedagogical grammar across the curriculum.

Aside

Extra information that isn't strictly necessary. Asides are great for tips, clarifications, making connections to earlier or previous lessons, for explaining the history or logic behind a structure, etc. Optionally includes a title.

{% aside(title="How can I know if I'm in a poetry shell?") %}

When you are in a Poetry shell, you'll see the command prompt change; there
will be a prefix like `(making-with-code-py3.11)`.

{% end %}

Checkpoint

We use checkpoints in labs to ensure that all members of a group have completed a task before moving on. Checkpoints require some demonstrable proof (usually written in the course journal) and often teachers require groups to check in before moving on. Checkpoints are automatically numbered.

{% checkpoint() %}

Make sure your function works. Then answer the following questions:

- How many arguments does this function require? 
- What types of values does this function expect? 
- What are the possible return values of this function?

{% end %}

Code action

Tells students to run something on their computer.

{{ code_action() }} Run `which git` to ensure that you have git installed on your computer. 
(`which` shows the location of a program, if it can be found.)

๐Ÿ’ป Run which git to ensure that you have git installed on your computer. (which shows the location of a program, if it can be found.)

Deliverables

We use deliverables to explain what is expected at the end of a lab or other assignment.

{% deliverables() %}

Make sure all three functions in `list_processing.py` work properly and that all the tests 
pass. Then commit your work and push it to the server.

{% end %}

Devnote

Use for notes meant for developers and todo items. Ideally, devnotes will never appear in the Production branch. However they may be used for workarounds when something is broken.

{% devnote() %}

This lesson went horribly. Need to revise.

{% end %}

Look action

Tells students to pay close attention to something.

{{ look_action() }} Note the line number of the error.

๐Ÿ‘ Note the line number of the error.

Self-check

A self-check is a quick question whose answer is immediately provided in a drop-down.

{% self_check(title=
  "We often need the turtle to move somewhere without drawing. 
  Could you write a function `fly` which works like `forward` but without drawing?"
) %}
```
def fly(distance):
    penup()
    forward(distance)
    pendown()
```
{% end %}

Teacher

Inserts the teacher's name, which can be configured.

Even Chris sometimes makes mistakes.

***Even {{ teacher() }} sometimes makes mistakes.***