Add initial migration to NextJS

This commit is contained in:
Corbin Crutchley
2021-11-06 11:50:09 -07:00
parent abe0dccfd8
commit a61f02d96e
229 changed files with 7550 additions and 28966 deletions

12
lib/markdownToHtml.ts Normal file
View File

@@ -0,0 +1,12 @@
import remark from 'remark'
import html from 'remark-html'
// TODO: Create types
const behead = require('remark-behead')
export default async function markdownToHtml(markdown: string) {
const result = await remark()
.use(behead, { after: 0, depth: 1 })
.use(html)
.process(markdown)
return result.toString()
}