Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
112 lines (71 sloc) 4.33 KB

Marp CLI example

The good starter example for using Marp via Marp CLI.

  • Write your slide deck by Marp Markdown.
  • Manage the content of slides via Git. (Using GitPitch style
  • Host your deck at GitHub, and publish as webpage with Netlify / Now!

See published slide


It's surprisingly easy to start writing your slide deck!


Push "Deploy to netlify" button. Netlify will create your repository based on this example and host website automatically.

Deploy to Netlify

After than, clone your repository and install Marp CLI. (Required Node.js >= 8)

git clone[your-name]/[repository-name].git
cd ./[repository-name]

npm install

OK, ready to write your slide deck! Edit with your favorite editor, and preview with npm run start. By pushing Git commit to master, Netlify will host the deck to website.

ℹ️ Netlify integration can make an Open Graph image automatically.


You can try publishing deck by using Now without a forked repository. After than install and setup Now, clone this repository and just run now.

git clone
cd ./marp-cli-example


An example slide will publish to https://marp-cli-example.[your-name] When you made a satisfied deck by editing, publish to your favorite and friendly URL by now alias.

# Alias to
now alias https://marp-cli-example.[your-name] friendly-subdomain

# Alias to your custom domain registered to Now
now alias https://marp-cli-example.[your-name]

Of course, you can manage deck via Git / GitHub at a forked repository. As same as Netlify, Now GitHub integration allows publishing master branch automatically.

How to write

Please see the documentation of Marpit Markdown, the features of Marp Core, and the default example in

Marp for VS Code extension is the best partner for writing Marp slide deck with live preview.

Assets and themes

  • assets directory can put your assets for using in the deck. (e.g. Image resources)
  • themes directory can put custom theme CSS. To use in the deck, please change theme global directive.

Preview deck

npm run start

It will be opened preview window via Chrome, and track change of

Build deck

npm run build

The built assets will output to dist folder.

Build per assets

npm run deck      # Output static HTML to dist/index.html
npm run og-image  # Output image for Open Graph to dist/og-image.jpg



You can’t perform that action at this time.