Marp (also known as the Markdown Presentation Ecosystem) provides an intuitive experience for creating beautiful slide decks.
Marp comes with various in-built themes to allow you to format the slides.
This repo applies an MoJ theme, see here for a demonstration.
The easiest way to use Marp is via the VS Code extension.
To apply the theme locally:
- Open Workspace Settings (JSON)
- Search for
markdown.marp.themes
- Add a URL or a local path to the
.css
file- URL: refer to this discussion about linking to files on GitHub
- Local path example:
./assets/theme_name.css
(theme needs to be somewhere in the project's directory)
{
"markdown.marp.themes": [
"https://cdn.jsdelivr.net/gh/ministryofjustice/marp-moj-theme/themes/moj.css"
]
}
- Enable the theme in the front-matter of the Markdown document, i.e., write the following at the very beginning of the Markdown document:
---
marp: true
theme: moj
---
For additional settings (such as size
or paginate
), follow the official documentation.
Marp also comes with a CLI interface
- Put the
.css
theme file in the directory of your Markdown document - Use the
--theme
parameter during the export and specify the path to the.css
file- e.g.:
marp --theme ./assets/theme_name.css document.md -o document.pdf