2018-07-11 17:56:13 +02:00
|
|
|
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: [
|
2018-07-17 23:33:55 +02:00
|
|
|
{
|
|
|
|
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')
|
|
|
|
}
|
|
|
|
},
|
2018-07-18 00:24:11 +02:00
|
|
|
{
|
|
|
|
resolve: 'gatsby-source-filesystem',
|
|
|
|
options: {
|
|
|
|
name: 'posts',
|
|
|
|
path: path.join(__dirname, 'content')
|
|
|
|
}
|
|
|
|
},
|
2018-07-11 17:56:13 +02:00
|
|
|
{
|
|
|
|
resolve: 'gatsby-transformer-remark',
|
|
|
|
options: {
|
2018-07-19 23:04:41 +02:00
|
|
|
excerpt_separator: '<!-- more -->',
|
2018-07-11 17:56:13 +02:00
|
|
|
plugins: [
|
|
|
|
{
|
|
|
|
resolve: 'gatsby-remark-images',
|
|
|
|
options: {
|
2018-07-17 23:33:55 +02:00
|
|
|
maxWidth: 940,
|
|
|
|
linkImagesToOriginal: false,
|
2018-07-20 15:23:57 +02:00
|
|
|
// sizeByPixelDensity: true,
|
2018-07-18 00:24:11 +02:00
|
|
|
showCaptions: true,
|
2018-07-18 02:19:32 +02:00
|
|
|
backgroundColor: '#dfe8ef'
|
2018-07-11 17:56:13 +02:00
|
|
|
}
|
|
|
|
},
|
2018-07-19 23:04:41 +02:00
|
|
|
{
|
|
|
|
resolve: 'gatsby-remark-copy-linked-files',
|
|
|
|
options: {
|
|
|
|
destinationDir: 'media'
|
|
|
|
}
|
|
|
|
},
|
2018-07-18 02:19:32 +02:00
|
|
|
'gatsby-remark-prismjs',
|
2018-07-17 23:33:55 +02:00
|
|
|
'gatsby-remark-smartypants',
|
|
|
|
'gatsby-remark-autolink-headers'
|
2018-07-11 17:56:13 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
resolve: 'gatsby-plugin-sass',
|
|
|
|
options: {
|
2018-07-18 00:24:11 +02:00
|
|
|
includePaths: [`${__dirname}/node_modules`, `${__dirname}/src/styles`]
|
2018-07-11 17:56:13 +02:00
|
|
|
}
|
|
|
|
},
|
2018-07-17 23:33:55 +02:00
|
|
|
'gatsby-plugin-react-helmet',
|
|
|
|
'gatsby-transformer-yaml',
|
|
|
|
'gatsby-transformer-sharp',
|
|
|
|
'gatsby-plugin-sharp',
|
2018-07-19 23:04:41 +02:00
|
|
|
'gatsby-plugin-sitemap',
|
|
|
|
'gatsby-plugin-catch-links'
|
2018-07-11 17:56:13 +02:00
|
|
|
]
|
|
|
|
}
|