forked from graphql/graphql.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
107 lines (106 loc) · 2.76 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
105
106
107
module.exports = {
siteMetadata: {
title: "A query language for your API",
description:
"GraphQL provides a complete description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.",
siteUrl: "http://graphql.org/",
},
plugins: [
"gatsby-plugin-react-helmet",
'gatsby-plugin-anchor-links',
{
resolve: "gatsby-source-filesystem",
options: {
name: "content",
path: `${__dirname}/src/content`,
},
},
`gatsby-transformer-remark`,
{
resolve: `gatsby-plugin-webfonts`,
options: {
fonts: {
google: [
{
family: `Rubik`,
variants: [`300`],
},
{
family: `Roboto Mono`,
variants: [`400`, `400i`, `600`],
},
{
family: `Roboto`,
variants: [`300`],
},
],
},
},
},
`gatsby-plugin-less`,
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: "UA-44373548-16",
},
},
{
resolve: "gatsby-plugin-feed",
options: {
query: `
{
site {
siteMetadata {
siteUrl
}
}
}
`,
feeds: [
{
serialize: ({ query: { site, allMarkdownRemark } }) =>
allMarkdownRemark.edges.map(
({
node: {
excerpt,
frontmatter: { title, date, permalink, byline },
},
}) => ({
title,
date,
url: site.siteMetadata.siteUrl + permalink,
description: excerpt,
author: byline,
})
),
query: `
{
allMarkdownRemark(
filter: {frontmatter: {layout: {eq: "blog"}}},
sort: { order: DESC, fields: [frontmatter___date] }
) {
edges {
node {
excerpt
frontmatter {
title
date
permalink
byline
}
}
}
}
}
`,
output: "/blog/rss.xml",
title: "Blog | GraphQL",
feed_url: "http://graphql.org/blog/rss.xml",
site_url: "http://graphql.org",
},
],
},
},
],
}