1
0
Fork 0
blog/gatsby-config.js

57 lines
1.3 KiB
JavaScript

const path = require('path')
const fs = require('fs')
const yaml = require('js-yaml')
const meta = yaml.load(fs.readFileSync('./content/meta.yml', 'utf8'))
const { url } = meta
module.exports = {
siteMetadata: {
siteUrl: `${url}`
},
plugins: [
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'posts',
path: path.join(__dirname, 'content', 'posts')
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'media',
path: path.join(__dirname, 'content', 'media')
}
},
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
{
resolve: 'gatsby-remark-images',
options: {
maxWidth: 940,
linkImagesToOriginal: false,
sizeByPixelDensity: true,
showCaptions: true
}
},
'gatsby-remark-smartypants',
'gatsby-remark-autolink-headers'
]
}
},
{
resolve: 'gatsby-plugin-sass',
options: {
includePaths: [`${__dirname}/node_modules`]
}
},
'gatsby-plugin-react-helmet',
'gatsby-transformer-yaml',
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
'gatsby-plugin-sitemap'
]
}