markdown/slide

Source: slide.js:2


Instance Methods

slide(md: MarkdownIt, opts?: Object)

Marpit slide plugin.

Split markdown-it tokens into the slides by horizontal rule. Each slides will be wrapped by section element.

Parameters

  • md (MarkdownIt) — markdown-it instance.
  • opts (Object, optional)
    • opts.attributes (Object, optional) — The <section> element attributes by key-value pairs.
    • opts.anchor (boolean | Marpit~AnchorCallback, optional, default: true) — If true, assign the anchor with the page number starting from 1. You can customize anchor name by passing callback function.