Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 537 Bytes

readme.md

File metadata and controls

28 lines (20 loc) · 537 Bytes

premark

Create slides with remark.

Usage

Dependencies:

const fs = require('fs');
const remark = require('remark');
const html = require('remark-html');
const premark = require('premark');

Process:

const example = fs.readFileSync('example.md', 'utf-8');
const result = remark().use(premark).use(html).processSync(example);

Result:

<section class="slide"><h1>Example Title</h1><h2>Slide 1</h2><p>content</p></section>
<section class="slide"><h2>Slide 2</h2><p>content</p></section>