Skip to content
BoKSA

The slide deck

The slide deck

Your repository contains a slide deck that is written in Markdown and built with Marp. It is published together with your website, so the slides for a sprint review or for presenting your learning group work are always online, always up to date, and can show your live application.

Your slides are public too

The slide deck is published to the open internet, just like your documentation. See What not to publish.

Where things are

File or folder What it is
markdown-presentation/demo-slides.md Your slides.
markdown-presentation/images/ The images used in your slides.
markdown-presentation/marp-custom.css The look of your slides.

After a push to the default branch, your slides are at the address of your website followed by /slides/.

Write slides

Open markdown-presentation/demo-slides.md. The file starts with a few settings between two lines of ---. Keep them:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
---
marp: true
theme: learning-group
---

# Recognising sign language

Team Sign Language

---

## What we wanted to find out

- How much data does a model need?
- What happens with **left-handed** signers?

---

## What we learned
  • theme must be the name that is declared in the first line of marp-custom.css. Use the name that is already in your slide file.
  • A line with only --- starts a new slide. Leave an empty line above and below it.
  • Everything else is normal Markdown: titles, lists, bold text, links, images and code blocks.
  • Keep slides short. Text that does not fit simply runs off the slide.

Useful extras in the settings at the top:

1
2
3
4
5
6
---
marp: true
theme: learning-group
paginate: true
footer: Team Sign Language
---

paginate adds slide numbers and footer adds a line of text at the bottom of every slide.

Images

Put your images in markdown-presentation/images/ and link to them relatively:

1
![Our test setup](./images/test-setup.jpg)

Only the images folder is published

The pipeline copies markdown-presentation/images/ to the website and nothing else. An image in another folder shows up in your local build but is missing online.

Marp can size and place images through the text between the square brackets:

You write Result
![w:500](./images/photo.jpg) The image is 500 pixels wide.
![bg](./images/photo.jpg) The image fills the whole slide as a background.
![bg right:40%](./images/photo.jpg) The image fills the right 40% of the slide; your text takes the rest.

Show your application in a slide

Because the slides are part of the same website, you can show your published application live in a slide:

1
2
3
4
## Demo: the gesture game

<iframe src="../apps/gesture-game/index.html" width="100%" height="480"
        allow="camera; microphone"></iframe>

The path starts with ../ because the slides are in the /slides/ folder of your website. This only works on the published website, not when you open a locally built slide file.

Have a plan B

Live demos fail at the worst moment: no Wi-Fi, a camera that is not allowed, a back-end that is not running. Put a screenshot or a short recording on the next slide.

The demo slides in your repository also show how to use formulas, Mermaid diagrams and JavaScript libraries such as p5.js and D3 in a slide. Look at them before you delete them.

Change the look of your slides

The look is set in markdown-presentation/marp-custom.css. The colours are defined once at the top:

1
2
3
4
5
6
7
:root {
  --color-background: #ffffff;
  --color-foreground: #1f2937;
  --color-heading: #0f172a;
  --color-accent: #2563eb;
  --color-muted: #6b7280;
}

Change these values to restyle the whole deck. Below them, the section block sets the font, the font size and the padding of every slide. A section is one slide.

Leave the first line of the file, which looks like /* @theme learning-group */, as it is. It gives the theme the name that your slides refer to.

To give one slide a different look, put a class on it. The stylesheet already has one called lead, with a coloured background for title slides:

1
2
3
4
5
6
7
---

<!-- _class: lead -->

# Thank you

Questions?

Add your own classes in the stylesheet as section.your-class { ... }.

Build and preview

With Docker, in the root of your repository:

1
docker compose run --rm marp

This writes the deck to public/slides/index.html. Open that file in your browser. Images do not show in this local build, because only the pipeline copies the images folder; they do show on the published website.

For a live preview while you write, install the Marp for VS Code extension. Open your slide file and click the preview button in the top-right corner. The preview shows your slides with a default look unless you add this to .vscode/settings.json in your repository:

1
2
3
{
    "markdown.marp.themes": ["./markdown-presentation/marp-custom.css"]
}

Present

Open the published slides in your browser.

Key What it does
→ or Space Next slide
← Previous slide
F Full screen
P Presenter view, with your notes and the next slide

For presenter notes, write a comment on a slide. It is not shown to the audience:

1
2
3
4
5
## What we learned

- More data did not help

<!-- Mention the experiment with 50, 200 and 1000 images. -->

Add a link on your home page, docs/index.md:

1
[Our slides](slides/index.html)

MkDocs will mention in the terminal that it cannot find this file. That is expected: the slides are added to the website by the pipeline, after MkDocs is done. The link works on the published website. On other pages than the home page, use the full address of your slides instead.

Renaming your slide file

The name demo-slides.md is written in two other files. If you rename your slide file, change the name there as well, or the pipeline fails:

  • .gitlab-ci.yml, in the last line of the build_marp job.
  • docker-compose.yml, in the command of the marp service.

In both, replace markdown-presentation/demo-slides.md with the new name and leave the rest of the line as it is.

Sooner or later you need a second presentation, for example for the next sprint or the next learning group cycle. The simplest approach is to keep one file for the current presentation and to save the old one under another name in the same folder. Only the file named in .gitlab-ci.yml is published.

Checklist

  • The demo slides are replaced by my own.
  • All my images are in markdown-presentation/images/.
  • I opened the published slides and clicked through all of them.
  • My live demo works on the published slides, and I have a screenshot or recording as a backup.
  • There is nothing on my slides that should not be public.