1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-14 09:05:17 +01:00
blog/gatsby-config.js

74 lines
1.8 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-source-filesystem',
options: {
name: 'posts',
path: path.join(__dirname, 'content')
}
},
{
resolve: 'gatsby-transformer-remark',
options: {
excerpt_separator: '<!-- more -->',
plugins: [
{
resolve: 'gatsby-remark-images',
options: {
maxWidth: 940,
linkImagesToOriginal: false,
// sizeByPixelDensity: true,
showCaptions: true,
backgroundColor: '#dfe8ef'
}
},
{
resolve: 'gatsby-remark-copy-linked-files',
options: {
destinationDir: 'media'
}
},
'gatsby-remark-prismjs',
'gatsby-remark-smartypants',
'gatsby-remark-autolink-headers'
]
}
},
{
resolve: 'gatsby-plugin-sass',
options: {
includePaths: [`${__dirname}/node_modules`, `${__dirname}/src/styles`]
}
},
'gatsby-plugin-react-helmet',
'gatsby-transformer-yaml',
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
'gatsby-plugin-sitemap',
'gatsby-plugin-catch-links'
]
}