An open API service indexing awesome lists of open source software.

https://github.com/swizec/remark-code-screenshot

Remark plugin to turn code blocks into carbon.now.sh screenshots.
https://github.com/swizec/remark-code-screenshot

gatsby markdown remark remark-plugin remarkjs

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# remark-code-screenshot

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

## Basic Usage

````javascript
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:

![](https://github.com/Swizec/remark-code-screenshot/blob/master/screenshot-1547104367079.png?raw=true)