Skip to content
Margent
Language
All guides

Marp slides

For owners · Publish decks as slides, with comments on a slide and its source lines.

How decks show up

A Marp deck is a Markdown file with marp: true in its front matter. Margent renders Markdown itself, but not Marp: a deck uploaded as its .md source shows as one long plain page, without its theme or slide breaks.

So build the deck in the publish workflow with Marp, and upload the built HTML. Then it shows as slides, and every comment knows its slide and the source lines it is about. Your agent goes straight to the spot in the .md file.

Build a deck for Margent

  1. Add the sourcepos plugin. It marks every slide and every block with its source lines. Copy it from the publish action’s repository and load it from a Marp config used only for this build (engine: ({ marp }) => marp.use(sourcepos)). A --config-file replaces your .marprc.yml, so repeat its settings, html: true in particular.
  2. Build into a staging folder that mirrors the repository, for example _margent/slides/intro/index.html, so relative image paths still work. Git-ignore that folder as a whole, or the upload leaves out built pages that your .gitignore keeps out of the repository.
  3. Add a manifest.json at the root of the folder that names each deck: {"path": "slides/intro/index.html", "kind": "marp", "title": "Intro", "source_file": "slides/intro.md"}.
  4. Upload the folder with dir: _margent. Before the first push, margent push _margent --dry-run lists what would go up: every deck’s index.html should be there.

The setup guide has the plugin, the config and a complete workflow to copy. The agent instructions on the project page link to it too.

The plain page next to a deck

If the deck’s .md source is uploaded as well, Margent still renders it as a plain page. By default that page is left out of the document list whenever the same build has the deck built from it (a manifest entry with kind: marp naming it as source_file). The page is still served, and comments on it stay where they are.

An owner can show these pages again under Settings → Marp slides. Leaving the sources out of the upload works too, and keeps the build smaller.

Good to know

  • Comments on a slide without selected text are about the whole slide.
  • Speaker notes are not part of the slide text, so quotes are searched only on the slide itself.
  • A deck built without the plugin still shows and takes comments, but they carry no slide number or source line.