Skills2026年5月4日·1 分钟阅读

Marp — Create Presentation Slides from Markdown

A Markdown-based presentation ecosystem with a CLI, VS Code extension, and browser-based engine that converts Markdown files into HTML, PDF, and PowerPoint slide decks.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Marp Overview
通用 CLI 安装命令
npx tokrepo install 6d9aa1d3-47d7-11f1-9bc6-00163e2b0d79

Introduction

Marp (Markdown Presentation Ecosystem) lets developers write presentation slides in plain Markdown and convert them to polished HTML, PDF, or PPTX output. It brings the speed and version control of text-based authoring to slide decks, eliminating the need for GUI presentation tools.

What Marp Does

  • Converts Markdown files into self-contained HTML slide decks with a single command
  • Exports to PDF and PowerPoint formats for sharing and offline presentation
  • Uses --- as a slide separator and supports standard Markdown syntax including images and code blocks
  • Provides built-in themes (default, gaia, uncover) and supports custom CSS themes
  • Offers directives for per-slide styling, background images, and layout control via front-matter

Architecture Overview

Marp is composed of three main packages: Marp Core is the Markdown-to-slide rendering engine built on markdown-it, Marp CLI wraps Core with file I/O and export functionality using Puppeteer for PDF/PPTX generation, and the VS Code extension provides live preview. Slide separation, directive parsing, and theme injection happen in the Core pipeline. The output is standard HTML with embedded CSS and can be served as static files.

Self-Hosting & Configuration

  • Install the CLI: npm install -g @marp-team/marp-cli
  • Install the VS Code extension "Marp for VS Code" for live preview
  • Add a marp: true front-matter flag to enable Marp rendering in VS Code
  • Set themes, page size, and export options in front-matter or a .marprc.yml config file
  • Run marp --server . to start a live-reload development server for slide editing

Key Features

  • Slides are plain Markdown files that version cleanly in Git
  • Export to HTML, PDF, and PPTX from a single source
  • Scoped CSS per slide using directives like <!-- _class: lead -->
  • Background images and split layouts with simple directive syntax
  • Live-reload server for rapid slide development

Comparison with Similar Tools

  • Slidev — Vue-powered slide framework with component support; Marp is simpler and Markdown-pure
  • Reveal.js — HTML-based presentation framework; Marp offers a more streamlined Markdown-to-slides workflow
  • Google Slides / PowerPoint — GUI-based; Marp is text-first, versionable, and automatable
  • Deckset — macOS app for Markdown slides; Marp is free, cross-platform, and open source
  • Remark.js — browser-based Markdown slides; Marp adds PDF/PPTX export and a richer theme system

FAQ

Q: How do I separate slides? A: Use --- (three dashes) on its own line to mark where one slide ends and the next begins.

Q: Can I use custom CSS themes? A: Yes. Create a CSS file and reference it with --theme your-theme.css in the CLI or via front-matter.

Q: Does Marp support speaker notes? A: Yes. Add HTML comments <!-- speaker notes here --> after slide content. They appear in presenter view.

Q: Can I include diagrams or charts? A: Marp supports images and HTML. You can embed Mermaid or other rendered diagrams as images or use plugins.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产