portfolio/gatsby-config.js

80 lines
1.9 KiB
JavaScript
Raw Normal View History

2018-05-04 01:58:43 +02:00
const path = require('path')
2018-05-07 15:39:42 +02:00
const fs = require('fs')
2018-05-05 00:17:26 +02:00
const yaml = require('js-yaml')
2019-03-30 00:24:57 +01:00
const meta = yaml.load(fs.readFileSync('./content/meta.yml', 'utf8'))
2019-11-19 22:49:17 +01:00
const resume = require('./content/resume.json')
const { matomoSite, matomoUrl } = meta[0]
const { name, website } = resume.basics
2018-04-08 00:19:54 +02:00
2019-11-16 14:55:30 +01:00
require('dotenv').config()
2019-11-16 13:37:25 +01:00
if (
!process.env.GATSBY_GITHUB_TOKEN ||
process.env.GATSBY_GITHUB_TOKEN === 'xxx'
) {
throw Error(`
A GitHub token as GATSBY_GITHUB_TOKEN is required to build some parts of the blog.
Check the README https://github.com/kremalicious/portfolio#-development.
`)
}
2018-04-06 17:24:35 +02:00
module.exports = {
siteMetadata: {
2019-11-19 22:49:17 +01:00
siteUrl: `${website}`
2018-04-06 17:24:35 +02:00
},
plugins: [
2018-07-15 00:13:35 +02:00
{
2019-08-11 21:47:22 +02:00
resolve: 'gatsby-source-filesystem',
2018-07-15 00:13:35 +02:00
options: {
2019-08-11 21:47:22 +02:00
name: 'content',
path: path.join(__dirname, 'content')
2018-07-15 00:13:35 +02:00
}
},
2018-04-07 14:18:06 +02:00
{
2019-08-11 21:47:22 +02:00
resolve: 'gatsby-source-filesystem',
2018-04-07 14:18:06 +02:00
options: {
2019-08-11 21:47:22 +02:00
name: 'images',
path: path.join(__dirname, 'src', 'images')
2018-05-22 22:51:41 +02:00
}
2018-04-07 14:18:06 +02:00
},
2020-06-01 12:08:35 +02:00
'gatsby-transformer-yaml',
'gatsby-transformer-json',
2021-03-13 01:03:23 +01:00
'gatsby-plugin-image',
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
2018-09-20 19:06:46 +02:00
{
resolve: 'gatsby-plugin-svgr',
options: {
icon: true
}
},
2018-05-07 19:31:10 +02:00
{
resolve: 'gatsby-plugin-matomo',
options: {
siteId: `${matomoSite}`,
2019-11-19 22:49:17 +01:00
siteUrl: `${website}`,
2018-05-07 19:31:10 +02:00
matomoUrl: `${matomoUrl}`,
2021-03-13 22:50:00 +01:00
localScript: '/matomo.js',
2020-04-12 11:15:54 +02:00
trackLoad: false
2018-05-22 22:51:41 +02:00
}
2018-05-07 19:31:10 +02:00
},
2018-05-07 01:43:33 +02:00
{
resolve: 'gatsby-plugin-manifest',
2018-05-07 01:43:33 +02:00
options: {
2019-11-19 22:49:17 +01:00
name: name.toLowerCase(),
short_name: 'mk',
start_url: '/',
background_color: '#e7eef4',
2019-11-09 19:12:58 +01:00
theme_color: '#e7eef4',
icon: 'src/images/favicon.png',
2019-11-09 19:12:58 +01:00
display: 'standalone',
cache_busting_mode: 'name',
theme_color_in_head: false // dynamically set in ThemeSwitch
2018-05-22 22:51:41 +02:00
}
2018-07-15 00:13:35 +02:00
},
'gatsby-plugin-react-helmet',
2018-08-06 14:51:53 +02:00
'gatsby-plugin-sitemap',
2022-02-12 14:51:58 +01:00
'gatsby-plugin-offline'
2018-05-22 22:51:41 +02:00
]
2018-04-06 17:24:35 +02:00
}