mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Matthias Kretschmann
3729c63581
* migrate to Next.js * migrate scripts * generate markdown pages * make all the markdown work * fix profile, fix image loading * git+ssh → git+https, again * bump packages * maybe windows build fix * add public to gitignore Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * Next.js v12! Webpack 5! No build hacks anymore * json import fixes * fixes Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
13 lines
350 B
TypeScript
13 lines
350 B
TypeScript
import remark from 'remark'
|
|
import remarkHtml from 'remark-html'
|
|
import remarkGfm from 'remark-gfm'
|
|
|
|
export function markdownToHtml(markdown: string): string {
|
|
const result = remark()
|
|
.use(remarkGfm)
|
|
.use(remarkHtml) // serializes through remark-rehype and rehype-stringify
|
|
.processSync(markdown).contents
|
|
|
|
return result.toString()
|
|
}
|