-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
107 lines (104 loc) · 2.48 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
const dotenv = require('dotenv')
const path = require('path')
dotenv.config({
path: path.resolve(__dirname, `.env.${process.env.NODE_ENV}`),
})
contentfulConfig = {
spaceId: process.env.GATSBY_CONTENTFUL_SPACE_ID,
accessToken: process.env.GATSBY_CONTENTFUL_ACCESS_TOKEN,
}
module.exports = {
siteMetadata: {
title: 'SNS Blog',
description:
'A place for me to share whatever I want to share with the world.',
author: 'SnekNOTSnake',
},
plugins: [
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: ['gatsby-remark-prismjs'],
},
},
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
{
resolve: 'gatsby-source-contentful',
options: contentfulConfig,
},
{
resolve: 'gatsby-plugin-typography',
options: {
pathToConfigModule: 'src/utils/typography.js',
},
},
{
resolve: 'gatsby-remark-prismjs',
options: {
classPrefix: 'language-',
inlineCodeMarer: null, // or `>`
aliases: {
sh: 'bash',
},
showLineNumbers: true,
noInlineHighlight: false,
prompt: {
user: 'SNS',
host: 'SNS-Desktop',
// either set prompt.global to true in gatsby-config.js, or pass at least one of `{outputLines: <range>}`, `{promptUser: <user>}`, or `{promptHost: <host>}` to a snippet
global: true,
},
},
},
{
resolve: 'gatsby-plugin-nprogress',
options: {
color: '#3b82bd',
showSpinner: true,
},
},
{
resolve: `@gatsby-contrib/gatsby-plugin-elasticlunr-search`,
options: {
// Fields to index
fields: [`title`, `tags`, `body`, `description`, `slug`],
// 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
ContentfulBlogPost: {
title: (node) => node.title,
tags: (node) => node.tags,
body: (node) => node.fields.body,
description: (node) => node.fields.description,
slug: (node) => node.slug,
},
},
},
},
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: process.env.GATSBY_GOOGLE_ANALYTICS_TRACKING_ID,
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
lang: 'en',
name: 'SNS Blog',
short_name: 'SNS Blog',
start_url: '/',
background_color: '#141820',
theme_color: '#141820',
display: 'standalone',
icon: 'src/images/sns.png',
icon_options: {
purpose: 'maskable',
},
},
},
'gatsby-plugin-offline',
'gatsby-plugin-react-helmet',
],
}