- CSS 49.3%
- JavaScript 19.1%
- HTML 18%
- TypeScript 7.6%
- SCSS 5.1%
- Other 0.9%
| __pycache__ | ||
| favicon | ||
| site | ||
| slides | ||
| .DS_Store | ||
| .gitignore | ||
| .python-version | ||
| matrix.py | ||
| mkslides.yml | ||
| README.md | ||
| requirements.txt | ||
| slideshow.html.jinja | ||
Studio UMZU workshop slides
Markdown slide decks for Studio UMZU workshops, built with MkSlides and Reveal.js.
Requirements
- Python 3.10 or newer
pip- A browser with internet access when viewing decks that contain MakeCode blocks (see MakeCode blocks)
Setup
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
Build
Build all Markdown decks from slides/ into site/:
mkslides build
For a strict build, which fails on unresolved relative links:
mkslides build --strict
The generated site is ignored by Git. Open site/index.html in a browser to choose a deck, or open a deck directly, for example site/roboter-funk/index.html.
To preview while editing:
mkslides serve
Run mkslides serve --help for the available server options.
Project layout
mkslides.yml MkSlides and Reveal.js configuration
matrix.py Preprocess script: the {{ matrix }} and {{ blocks }} shortcodes
slides/ Markdown source and shared assets
*/index.md Slide decks
theme.css Shared Reveal.js theme
makecode-blocks.js Browser script that renders {{ blocks }} as SVG
images/ Deck-specific images
favicon/ Browser icon and web manifest
site/ Generated HTML and bundled assets (ignored)
requirements.txt Python dependencies
Authoring slides
Each deck is a Markdown file named index.md. Separate horizontal slides with:
---
Use -- for vertical slides and Notes: for speaker notes. Relative images and links are resolved from the Markdown file's directory.
The shared theme adds the Studio UMZU logo and signature line to regular slides. Add the title-slide class to a title section when those decorations should be hidden, or no-logo when only the logo should be hidden.
Shortcodes
matrix.py is set as preprocess_script in mkslides.yml. MkSlides runs it over every Markdown file before building, and it expands the shortcodes below. Both are left alone inside fenced code blocks.
Dot-matrix display
{{ matrix ... }} draws text on a 16×2 dot-matrix display as inline SVG, so nothing has to be loaded. Colors follow the theme variables --umzu-red, --umzu-lcd-panel and --umzu-lcd-off in slides/theme.css.
{{ matrix Studio UM_ZU | Workshop 2026 }} two lines, split at "|"
{{ matrix Hello World, this wraps }} one text, wrapped at 16 columns
{{ matrix.center Hello | World }} also .left (default) and .right
{{ matrix a \| b | second line }} a literal "|" is written \|
Text beyond 16 columns × 2 lines is cut off, with a warning in the build output. Escape a literal shortcode with a backslash: \{{ matrix ... }}.
To test a display on its own: python matrix.py "Hello | World" > test.html.
MakeCode blocks
{{ blocks }} ... {{ /blocks }} shows Calliope mini code as MakeCode blocks. Write the code in MakeCode's JavaScript (English API names); it is displayed as blocks.
{{ blocks }}
basic.forever(function () {
basic.showString("Hallo!")
basic.showIcon(IconNames.Heart)
})
{{ /blocks }}
Optional settings go on the opening tag, for example {{ blocks width=600 align=left }}:
| Option | Effect |
|---|---|
width=600, 50%, 20em |
Width of the blocks. A bare number means px. The height follows automatically. |
scale=1.5 |
Multiplier on the natural size. Ignored when width is set. |
align=left|center|right |
Horizontal alignment. Default is center. |
x=100 y=200 |
Fixed position within the slide in px, like an absolutely positioned image. |
How it works: matrix.py turns the block into a placeholder, and slides/makecode-blocks.js sends the code to MakeCode's own block renderer (a hidden iframe on makecode.calliope.cc) and inserts the SVG it returns.
Things to know:
- Needs internet on the first view. The renderer loads from
makecode.calliope.cc, and the first render can take several seconds. Finished SVGs are cached in the browser'slocalStorage, so repeat views of the same snippet are instant. A new browser or cleared site data renders again. Open a deck once on the presentation machine beforehand if the wifi is unreliable. - German labels. The block labels are German. The language is set by
LANGat the top ofslides/makecode-blocks.js, or withwindow.MAKECODE_LANG = "en"before the script loads. - Unclosed blocks. A
{{ blocks }}without{{ /blocks }}is left as plain text, with a warning in the build output.
Wiring in mkslides.yml
slides:
preprocess_script: matrix.py # path relative to mkslides.yml
plugins:
- name: RevealMermaid
extra_javascript:
- ../mermaid.min.js
- ../makecode-blocks.js # served from slides/, next to the other scripts
The ../ prefix matches how the built pages sit one folder below site/. If makecode-blocks.js returns a 404 in the browser, it is not being copied next to mermaid.min.js in the build output.
Generated output
site/ is rebuilt from scratch by MkSlides. Do not edit generated HTML or copied assets there; change the Markdown, mkslides.yml, matrix.py, or slides/theme.css and rebuild instead.