Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const path = require('path')
const yml = require('gray-matter')
const fs = require('markdown-magic').fsExtra
const globby = require('markdown-magic').globby
const authorDirectory = path.join(__dirname, 'authors')
const postsDirectory = path.join(__dirname, 'posts')
const dateFormatRegex = /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])-/g
// Example shape of author data
const authorData = {
"name": "David Wells",
"github": "davidwells",
"avatar": "https://avatars2.githubusercontent.com/u/532272?v=3&s=60",
"bio": {
"short": "David Wells is a developer at Serverless, Inc.",
"long": "David is a Full Stack JavaScript Developer, entrepreneur, past life marketer. Developer @ http://serverless.com "
}
}