This repository has been archived by the owner on Jan 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
104 lines (100 loc) · 2.54 KB
/
gatsby-config.js
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
require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})
// Config wouldn't work unless seperated like this
// Thanks to Max Mitchell for this configuration and SEO layout 👍
const contentfulConfig = {
spaceId: process.env.GATSBY_CONTENTFUL_SPACE_ID,
accessToken: process.env.GATSBY_CONTENTFUL_ACCESS_TOKEN,
}
module.exports = {
siteMetadata: {
siteUrl: "https://www.jamesaide.com",
title: "James Ide",
titleTemplate: "James Ide | %s",
description:
"James Ide's personal website showcasing hiking trips, photo collections and work experience. ",
headline: "James Ide's personal website",
siteLanguage: "en",
ogLanguage: "en_US",
author: "James Ide",
twitter: "1macros",
facebook: "James Ide",
},
/* Your site config here */
plugins: [
"gatsby-plugin-postcss",
"gatsby-plugin-sharp",
`gatsby-plugin-react-helmet`,
"gatsby-plugin-image",
`gatsby-plugin-offline`,
`gatsby-plugin-sitemap`,
{
resolve: "gatsby-plugin-robots-txt",
options: {
host: "https://www.jamesaide.com",
sitemap: "https://jamesaide.com/sitemap/sitemap-0.xml",
policy: [{ userAgent: "*", allow: "/" }],
},
},
{
resolve: "gatsby-plugin-mdx",
options: {
extensions: [".mdx", ".md"],
},
},
{
resolve: "gatsby-source-contentful",
options: contentfulConfig,
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `src`,
path: `${__dirname}/src`,
},
},
{
resolve: `gatsby-source-github-api`,
options: {
token: process.env.GATSBY_GITHUB_API_TOKEN,
graphQLQuery: `
query($username: String!){
user(login: $username) {
pinnedItems(first: 6, types: REPOSITORY) {
nodes {
... on Repository {
name
description
url
repositoryTopics(first:4) {
edges {
node {
topic {
name
}
}
}
}
createdAt
}
}
}
}
}
`,
variables: {
username: "JamesIde",
},
},
},
{
resolve: `gatsby-plugin-google-gtag`,
options: {
trackingIds: [
"G-GHS0468GG6", // Google Analytics / GA
],
},
},
],
}