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 “Marp: Themes” or “markdown.marp.themes”
- After downloading the theme, add its local
path/to/the/file.cssin the settings. Alternatively, add a trustworthy remote path to the CSS file- Links: please, consider forking the repository and hosting the CSS files using, for example, GitHub Pages instead of linking to the raw file on GitHub (reasoning)
- 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
.csstheme file in the directory of your Markdown document - Use the
--themeparameter during the export and specify the path to the.cssfile- e.g.:
marp --theme ./assets/theme_name.css document.md -o document.pdf