-
Notifications
You must be signed in to change notification settings - Fork 9
/
gatsby-config.js
executable file
·125 lines (124 loc) · 3.6 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
module.exports = {
pathPrefix: `/design-system-code`,
siteMetadata: {
title: 'Aurora',
langs: ['en', 'fr'],
defaultLangKey: 'en'
},
plugins: [
{
resolve: `gatsby-plugin-google-fonts`,
options: {
fonts: [
`Rubik\:400,500`,
`Nunito sans\:300,400,600,700` // you can also specify font weights and styles
]
}
},
'gatsby-plugin-react-helmet',
'gatsby-plugin-sass',
`gatsby-transformer-sharp`,
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/docs/`,
name: `markdown-pages`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `img`,
path: `${__dirname}/src/img/`
}
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-images`,
options: {
// It's important to specify the maxWidth (in pixels) of
// the content container as this plugin uses this as the
// base for generating different widths of each image.
maxWidth: 895,
linkImagesToOriginal: false,
},
},
{
resolve: `gatsby-remark-prismjs`,
options: {
classPrefix: "language-",
inlineCodeMarker: null,
aliases: {},
showLineNumbers: false,
noInlineHighlight: false,
},
},
],
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: "UA-29015462-4",
// Puts tracking script in the head instead of the body
head: false,
// Setting this parameter is optional
anonymize: true,
// Setting this parameter is also optional
respectDNT: true
},
},
/*
{
resolve: `gatsby-plugin-lunr`,
options: {
languages: [
{
// ISO 639-1 language codes. See https://lunrjs.com/guides/language_support.html for details
name: 'en',
// A function for filtering nodes. () => true by default
filterNodes: node => {
if (node.frontmatter !== undefined) {
if (node.frontmatter.lang === "en") {
return true;
}
}
return false;
}
// Add to index custom entries, that are not actually extracted from gatsby nodes
//customEntries: [{ title: 'Pictures', content: 'awesome pictures', url: '/pictures' }],
},
{
name: 'fr',
filterNodes: node => {
if (node.frontmatter !== undefined) {
if (node.frontmatter.lang === "fr") {
return true;
}
}
return false;
}
}
],
// Fields to index. If store === true value will be stored in index file.
// Attributes for custom indexing logic. See https://lunrjs.com/docs/lunr.Builder.html for details
fields: [
{ name: 'title', store: true, attributes: { boost: 30 } },
{ name: 'path', store: true },
],
// How to resolve each field's value for a supported node type
resolvers: {
// For any node of type MarkdownRemark, list how to resolve the fields' values
MarkdownRemark: {
title: node => node.frontmatter.title,
path: node => node.frontmatter.path,
},
},
},
},
*/
],
}