A CLI interface, for Marp (using @marp-team/marp-core) and any slide deck converter based on Marpit framework.
It can convert Marp / Marpit Markdown files into static HTML (and CSS).
npx is the best tool when you want to convert Markdown right now. Just run below if you are installed Node.js >= 8.2.0:
# Convert slide deck into HTML
npx @marp-team/marp-cli slide-deck.md
npx @marp-team/marp-cli slide-deck.md -o output.html
# Convert slide deck into PDF
npx @marp-team/marp-cli slide-deck.md --pdf
npx @marp-team/marp-cli slide-deck.md -o output.pdf
# Watch mode
npx @marp-team/marp-cli -w slide-deck.md
ℹ️ You have to install Google Chrome (or Chromium) to convert slide deck into PDF.
Do you hate to install node/chrome locally? We have an official Docker image ready to use CLI.
# Convert slide deck into HTML
docker run --rm -v $PWD:/home/marp/app/ marpteam/marp-cli slide-deck.md
# Convert slide deck into PDF by using Chromium in Docker
docker run --rm -v $PWD:/home/marp/app/ marpteam/marp-cli slide-deck.md --pdf
# Watch mode
docker run --rm --init -v $PWD:/home/marp/app/ -p 52000:52000 marpteam/marp-cli -w slide-deck.md
You can install CLI interface globally if you want to use marp
command.
npm install -g @marp-team/marp-cli
Usage:
marp slide-deck.md -o output.html
npm install --save-dev @marp-team/marp-cli
Under construction.
- Add
marp
bin - Convert to plain HTML (includes style)
- Use external theme file(s)
- Select theme by option
- Support configuration file (like
.marprc
) - Watch mode
- Auto-reload
- Server mode
- HTML templates
- Template that has ready to actual presentation powered by Bespoke
- Select engine to use any Marpit based module
- Export PDF directly by using Puppeteer
Managed by @marp-team.
- Yuki Hattori (@yhatt)