2022-11-20 02:05:16 +01:00
|
|
|
|
import * as dotenv from 'dotenv'
|
2023-01-29 22:58:19 +01:00
|
|
|
|
import path from 'path'
|
2022-11-20 02:05:16 +01:00
|
|
|
|
|
|
|
|
|
dotenv.config()
|
|
|
|
|
|
|
|
|
|
if (!process.env.GITHUB_TOKEN) {
|
|
|
|
|
// eslint-disable-next-line
|
|
|
|
|
console.warn(`
|
|
|
|
|
|
|
|
|
|
⚠️ A GitHub token as GITHUB_TOKEN is required to build some parts of the blog.
|
|
|
|
|
⚠️ Check the README https://github.com/kremalicious/blog#-development.
|
|
|
|
|
|
|
|
|
|
`)
|
|
|
|
|
}
|
2018-11-22 00:01:38 +01:00
|
|
|
|
|
2022-11-11 03:31:54 +01:00
|
|
|
|
export default [
|
2018-11-22 00:01:38 +01:00
|
|
|
|
{
|
|
|
|
|
resolve: 'gatsby-source-filesystem',
|
|
|
|
|
options: {
|
2020-07-11 11:42:37 +02:00
|
|
|
|
name: 'articles',
|
|
|
|
|
path: path.join(__dirname, '..', 'content', 'articles')
|
2018-11-22 00:01:38 +01:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
resolve: 'gatsby-source-filesystem',
|
|
|
|
|
options: {
|
|
|
|
|
name: 'photos',
|
|
|
|
|
path: path.join(__dirname, '..', 'content', 'photos')
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-02-28 22:14:36 +01:00
|
|
|
|
{
|
|
|
|
|
resolve: 'gatsby-source-filesystem',
|
|
|
|
|
options: {
|
|
|
|
|
name: 'links',
|
|
|
|
|
path: path.join(__dirname, '..', 'content', 'links')
|
|
|
|
|
}
|
|
|
|
|
},
|
2018-11-22 00:01:38 +01:00
|
|
|
|
{
|
|
|
|
|
resolve: 'gatsby-source-filesystem',
|
|
|
|
|
options: {
|
|
|
|
|
name: 'media',
|
|
|
|
|
path: path.join(__dirname, '..', 'content', 'media')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
resolve: 'gatsby-source-filesystem',
|
|
|
|
|
options: {
|
|
|
|
|
name: 'images',
|
|
|
|
|
path: path.join(__dirname, '..', 'src', 'images')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
resolve: 'gatsby-source-graphql',
|
|
|
|
|
options: {
|
|
|
|
|
typeName: 'GitHub',
|
|
|
|
|
fieldName: 'github',
|
|
|
|
|
url: 'https://api.github.com/graphql',
|
|
|
|
|
headers: {
|
2022-11-11 03:31:54 +01:00
|
|
|
|
Authorization: `Bearer ${process.env.GITHUB_TOKEN}`
|
2021-03-21 22:49:39 +01:00
|
|
|
|
}
|
2018-11-22 00:01:38 +01:00
|
|
|
|
// Additional options to pass to node-fetch
|
2021-03-21 22:49:39 +01:00
|
|
|
|
// fetchOptions: {},
|
|
|
|
|
// refetchInterval: 300 // 5 min.
|
2018-11-22 00:01:38 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|