Build three terminal slides from Markdown
Create a three-slide Markdown deck for presenterm, add a code block, and navigate it in a terminal.
Updated
in short
Write Markdown separated by end_slide comments, then open the file with presenterm. Code blocks are displayed as text unless execution is explicitly enabled.
Use the small fixture below to check the workflow before applying it to your own project.
Tools used
Before you start
- A Bash or Zsh terminal on Linux or macOS
- The listed tools installed and available on PATH
Steps
Step 1: Write the deck
The HTML comments below are slide commands, not visible slide text.
shtrmn_guide_dir="$(mktemp -d)" cd "$trmn_guide_dir" cat > demo.md <<'EOF' # A small terminal demo Three slides from one Markdown file. <!-- end_slide --> # A command to discuss ```sh printf 'hello from a slide\n' ``` <!-- end_slide --> # Next step - Adapt the deck for your project. - Keep code examples short. EOFStep 2: Open the presentation
Run this in an interactive terminal. Keep snippet execution disabled for this example.
shpresenterm demo.mdStep 3: Navigate and quit
Use the right and left arrow keys to move between slides. Press q to quit. If content is clipped, enlarge the terminal or shorten the slide.
Further reading
[presenterm documentation](https://mfontanini.github.io/presenterm/) · [Slide commands](https://mfontanini.github.io/presenterm/features/commands.html)
FAQ
- Will the code block run?
- Not in this example. Do not add the snippet-execution flags when you only want to display code.
- Do I need an image protocol?
- This deck contains text only. Image support is a separate terminal capability.