rsnext/examples/cms-takeshape/lib/markdownToHtml.js
Shu Uesugi a63ac3e715
CMS TakeShape Example (#11038)
* TakeShape Example

* Fix preview logic

* Update README

* Fix broken link

* Be more clear with the relationship field

* Use latest next.js for cms examples

* Only show enabled items

* Ignore current slug

* Fix queries

* Add takeshape demo

* Added link to blog-starter

Co-authored-by: Luis Alvarez D <luis@zeit.co>
2020-03-19 17:30:37 -05:00

9 lines
220 B
JavaScript

import remark from 'remark'
import html from 'remark-html'
export default async function markdownToHtml(markdown) {
const result = await remark()
.use(html)
.processSync(markdown)
return result.toString()
}