refactor: ♻️ Simplifies gatsby-config

This commit is contained in:
Daniel Soares
2020-12-15 11:32:59 -03:00
parent 31c1d99615
commit 8a0cadfa2a

View File

@@ -1,16 +1 @@
const fs = require('fs') module.exports = { plugins: [`@marscollective/gatsby-theme-link-free`] }
const yaml = require('js-yaml')
const metadata = yaml.safeLoad(
fs.readFileSync('./content/metadata.yaml', 'utf8')
)
module.exports = {
plugins: [
{
resolve: `@marscollective/gatsby-theme-link-free`,
options: {
metadata
}
}
]
}