[go: up one dir, main page]

Skip to content
forked from marp-team/marp-cli

A CLI interface for Marp and Marpit based converters

License

Notifications You must be signed in to change notification settings

spkane/marp-cli

 
 

Repository files navigation

@marp-team/marp-cli

CircleCI Codecov npm LICENSE

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).

⚠️ marp-cli is under construction and not ready to use stable.

Try it now!

npx

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.

Docker

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

Install

Global install

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

Local install

npm install --save-dev @marp-team/marp-cli

Usage

Under construction.

ToDo

  • 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

Author

Managed by @marp-team.

License

MIT License

About

A CLI interface for Marp and Marpit based converters

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 94.2%
  • JavaScript 2.8%
  • CSS 1.3%
  • Other 1.7%