-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.ts
109 lines (105 loc) · 2.77 KB
/
gatsby-config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import { config } from 'dotenv';
config({
path: `.env.${process.env.NODE_ENV}`,
});
declare global {
namespace NodeJS {
interface ProcessEnv {
NODE_ENV: 'development' | 'production';
PORT?: string;
PWD: string;
GITHUB_TOKEN: string;
GITHUB_USER: string;
SANITY_PROJECT_ID: string;
SANITY_DATASET: string;
SANITY_TOKEN: string;
GOOGLE_ANALYTICS_ID: string;
GATSBY_SITE_ORIGIN: string;
GATSBY_SITE_DISQUS_SHORTNAME: string;
GASTBY_SITE_AUTHOR_NAME: string;
GASTBY_SITE_AUTHOR_SHORTNAME: string;
GATSBY_SITE_DESCRIPTION: string;
GATSBY_SITE_KEYWORDS: string;
GITHUB_AUTH_TOKEN: string;
}
}
}
export default {
siteMetadata: {
title: 'Bogdan Bogdanov',
menuLinks: [
{
name: 'Home',
link: '/',
},
{
name: 'Blog',
link: '/blog',
},
{
name: 'Code snippets',
link: '/code-snippets',
},
// {
// name: 'Portfolio',
// link: '/portfolio'
// },
// {
// name: 'About me',
// link: '/about-me'
// },
],
},
plugins: [
`gatsby-plugin-sass`,
`gatsby-plugin-typescript`,
`gatsby-plugin-tsconfig-paths`,
`gatsby-plugin-tslint`,
`gatsby-plugin-theme-ui`,
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-disqus`,
options: {
shortname: process.env.GATSBY_SITE_DISQUS_SHORTNAME,
},
},
{
resolve: 'gatsby-source-sanity',
options: {
projectId: process.env.SANITY_PROJECT_ID,
dataset: process.env.SANITY_DATASET,
token: process.env.SANITY_TOKEN,
// If the Sanity GraphQL API was deployed using `--tag <name>`,
// use `graphqlTag` to specify the tag name. Defaults to `default`.
graphqlTag: 'default',
},
},
{
resolve: 'gatsby-source-graphql',
options: {
typeName: 'GitHub',
fieldName: 'github',
url: 'https://api.github.com/graphql',
// HTTP headers
headers: {
// Learn about environment variables: https://gatsby.dev/env-vars
Authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
},
// Additional options to pass to node-fetch
fetchOptions: {},
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
// The property ID; the tracking code won't be generated without it
trackingId: process.env.GOOGLE_ANALYTICS_ID,
// Defines where to place the tracking script - `true` in the head and `false` in the body
head: false,
// Avoids sending page view hits from custom paths
exclude: ['/preview/**', '/do-not-track/me/too/'],
forceSSL: true,
},
},
],
};