After clicking the “Download CSS” button on any theme’s page, your browser likely loads the .css
file instead of downloading it. You can save the .css
file locally using Ctrl + S
.
Marp for VS Code Extension
- Open Settings in VSCode (
Ctrl + ,
) - 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)
- 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: theme_name
---
For additional settings (such as size
or paginate
), follow the official documentation.
Marp CLI
- 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