This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathgatsby-config.js
151 lines (147 loc) · 3.45 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})
const ToolsQuery = `{
allToolsYaml {
edges {
node {
objectID: id
name
homepage
source
tags
license
description
deprecated
fields {
slug
}
}
}
}
}`
const TagsQuery = `{
allTagsYaml {
edges {
node {
name
objectID: id
tag
type
fields {
slug
}
}
}
}
}`
const queries = [
{
query: ToolsQuery,
indexName: "tools",
transformer: ({ data }) => data.allToolsYaml.edges.map(({ node }) => node),
},
{
query: TagsQuery,
indexName: "tags",
transformer: ({ data }) => data.allTagsYaml.edges.map(({ node }) => node),
},
]
module.exports = {
siteMetadata: {
title: `Analysis Tools`,
siteUrl: `https://analysis-tools.dev`,
},
flags: {
DEV_SSR: true,
FAST_DEV: true,
PRESERVE_WEBPACK_CACHE: true,
PRESERVE_FILE_DOWNLOAD_CACHE: true,
PARALLEL_SOURCING: true,
},
plugins: [
`gatsby-transformer-votes`,
`gatsby-plugin-sitemap`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `src`,
path: `${__dirname}/src/`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `tag-descriptions`,
path: `${__dirname}/content/tag-descriptions/`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content/blog`,
name: `blog`,
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
commonmark: true,
footnotes: true,
pedantic: true,
gfm: true,
// Plugins configs
plugins: [],
},
},
`gatsby-transformer-yaml`,
`gatsby-plugin-emotion`,
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-git`,
options: {
name: `static-analysis-tools`,
remote: `https://github.com/analysis-tools-dev/static-analysis.git`,
// Optionally supply a branch. If none supplied, you'll get the default branch.
branch: `master`,
// Tailor which files get imported e.g. import the docs folder from a codebase.
patterns: `data/tools/*.yml`,
},
},
{
resolve: `gatsby-source-git`,
options: {
name: `static-analysis-tags`,
remote: `https://github.com/analysis-tools-dev/static-analysis.git`,
// Optionally supply a branch. If none supplied, you'll get the default branch.
branch: `master`,
// Tailor which files get imported e.g. import the docs folder from a codebase.
patterns: `data/tags.yml`,
},
},
{
// This plugin must be placed last in your list of plugins to ensure that it can query all the GraphQL data
resolve: `gatsby-plugin-algolia`,
options: {
appId: process.env.ALGOLIA_APP_ID,
// Careful, not to prefix this with GATSBY_, since that way users can change
// the data in the index.
apiKey: process.env.ALGOLIA_API_KEY,
queries,
chunkSize: 1000,
settings: {
// optional, any index settings
},
},
},
{
resolve: "@sentry/gatsby",
options: {
dsn:
"https://[email protected]/5453104",
sampleRate: 0.7,
},
},
"gatsby-plugin-postcss",
],
}