Skip to content

Instantly share code, notes, and snippets.

const fs = require('fs')
const marked = require('marked')
const glob = require('glob')
const fm = require('front-matter')
const path = require('path')
const renderer = new marked.Renderer()
const fileNames = glob.sync(path.resolve('./contents/posts/*.md'))
const data = fileNames
.map(fileName => {