1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-22 17:23:22 +01:00
portfolio/scripts/content/markdown.ts

9 lines
248 B
TypeScript

import { remark } from 'remark'
import gfm from 'remark-gfm'
import html from 'remark-html'
export async function markdownToHtml(markdown: string) {
const result = await remark().use(gfm).use(html).process(markdown)
return result.toString()
}