remark-code-screenshot

1.0.0 • Public • Published

remark-code-screenshot

Remark plugin to convert code blocks into carbon.now.sh screenshots.

Basic Usage

import remark from 'remark'
import codeScreenshot from 'remark-code-screenshot'
 
const markdownInput = ["```
    import remark from 'remark'
    import codeScreenshot from 'remark-code-screenshot'
 
    const markdownInput = \"\"
 
    remark().use(codeScreenshot)
    .process(markdownInput, function (err, output) {
        console.log(output)
    })
```"]
 
remark()
    .use(codeScreenshot)
    .process(markdownInput, function (err, output) {
        console.log(output)
    });

Outputs something like this:

Readme

Keywords

none

Package Sidebar

Install

npm i remark-code-screenshot

Weekly Downloads

15

Version

1.0.0

License

MIT

Unpacked Size

13.4 kB

Total Files

5

Last publish

Collaborators

  • swizec