[Docs][m]: Add markdown for docs and api section
This commit is contained in:
13
docs/lib/utils.js
Normal file
13
docs/lib/utils.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import remark from 'remark'
|
||||
import html from 'remark-html'
|
||||
import fs from 'fs'
|
||||
|
||||
export async function formatMD(mdFilePath) {
|
||||
const mdFile = fs.readFileSync(mdFilePath, "utf-8")
|
||||
const processed = await remark()
|
||||
.use(html)
|
||||
.process(mdFile)
|
||||
|
||||
const readmeHtml = processed.toString()
|
||||
return readmeHtml
|
||||
}
|
||||
Reference in New Issue
Block a user