Syntax
Making with Code is a static site built with Zola. You will need to understand the basics of the Zola framework to contribute. Content is written in markdown, which you can probably pick up just by looking at some of the existing content.
Custom Shortcodes
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 %}
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 %}
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 %}
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 %}
Teacher
Inserts the teacher's name, which can be configured.
Even Chris sometimes makes mistakes.
***Even {{ teacher() }} sometimes makes mistakes.***