@@ -5,36 +5,37 @@ const ghostConfigDefaults = require(`./src/utils/.ghost.json`);
5
5
6
6
const generateRSSFeed = require ( `./src/utils/rss/generate-feed` ) ;
7
7
8
- module . exports = themeOptions => {
8
+ module . exports = ( themeOptions ) => {
9
9
const siteConfig = themeOptions . siteConfig || siteConfigDefaults ;
10
10
const ghostConfig = themeOptions . ghostConfig || ghostConfigDefaults ;
11
- const finalConfig = process . env . NODE_ENV === `development`
12
- ? ghostConfig . development
13
- : ghostConfig . production ;
11
+ const finalConfig =
12
+ process . env . NODE_ENV === `development`
13
+ ? ghostConfig . development
14
+ : ghostConfig . production ;
14
15
15
16
siteConfig . apiUrl = finalConfig . apiUrl ;
16
- console . log ( ' what is' , siteConfig ) ;
17
+ console . log ( " what is" , siteConfig ) ;
17
18
return {
18
19
siteMetadata : siteConfig ,
19
20
plugins : [
20
21
{
21
22
resolve : `gatsby-plugin-sass` ,
22
23
options : {
23
- sassRuleModulesTest : / .* \. m o d u l e \. s ( a | c ) s s $ /
24
- }
24
+ sassRuleModulesTest : / .* \. m o d u l e \. s ( a | c ) s s $ / ,
25
+ } ,
25
26
} ,
26
27
{
27
28
resolve : `gatsby-plugin-page-creator` ,
28
29
options : {
29
- path : path . join ( __dirname , `src` , `pages` )
30
- }
30
+ path : path . join ( __dirname , `src` , `pages` ) ,
31
+ } ,
31
32
} ,
32
33
{
33
34
resolve : `gatsby-source-filesystem` ,
34
35
options : {
35
36
path : path . join ( __dirname , `src` , `images` ) ,
36
- name : `images`
37
- }
37
+ name : `images` ,
38
+ } ,
38
39
} ,
39
40
`gatsby-plugin-sharp` ,
40
41
`gatsby-transformer-sharp` ,
@@ -43,23 +44,23 @@ module.exports = themeOptions => {
43
44
options :
44
45
process . env . NODE_ENV === `development`
45
46
? ghostConfig . development
46
- : ghostConfig . production
47
+ : ghostConfig . production ,
47
48
} ,
48
49
{
49
50
resolve : `gatsby-transformer-rehype` ,
50
51
options : {
51
- filter : node =>
52
+ filter : ( node ) =>
52
53
node . internal . type === `GhostPost` ||
53
54
node . internal . type === `GhostPage` ,
54
55
plugins : [
55
56
{
56
- resolve : `gatsby-rehype-prismjs`
57
+ resolve : `gatsby-rehype-prismjs` ,
57
58
} ,
58
59
{
59
- resolve : `gatsby-rehype-ghost-links`
60
- }
61
- ]
62
- }
60
+ resolve : `gatsby-rehype-ghost-links` ,
61
+ } ,
62
+ ] ,
63
+ } ,
63
64
} ,
64
65
/**
65
66
* Utility Plugins
@@ -81,8 +82,8 @@ module.exports = themeOptions => {
81
82
siteDescription
82
83
}
83
84
}
84
- }`
85
- }
85
+ }` ,
86
+ } ,
86
87
} ,
87
88
{
88
89
resolve : `gatsby-plugin-feed` ,
@@ -97,8 +98,8 @@ module.exports = themeOptions => {
97
98
}
98
99
}
99
100
}` ,
100
- feeds : [ generateRSSFeed ( siteConfig ) ]
101
- }
101
+ feeds : [ generateRSSFeed ( siteConfig ) ] ,
102
+ } ,
102
103
} ,
103
104
{
104
105
resolve : `gatsby-plugin-advanced-sitemap` ,
@@ -148,17 +149,17 @@ module.exports = themeOptions => {
148
149
` ,
149
150
mapping : {
150
151
allGhostPost : {
151
- sitemap : `posts`
152
+ sitemap : `posts` ,
152
153
} ,
153
154
allGhostTag : {
154
- sitemap : `tags`
155
+ sitemap : `tags` ,
155
156
} ,
156
157
allGhostAuthor : {
157
- sitemap : `authors`
158
+ sitemap : `authors` ,
158
159
} ,
159
160
allGhostPage : {
160
- sitemap : `pages`
161
- }
161
+ sitemap : `pages` ,
162
+ } ,
162
163
} ,
163
164
exclude : [
164
165
`/dev-404-page` ,
@@ -169,17 +170,17 @@ module.exports = themeOptions => {
169
170
`/offline.html` ,
170
171
] ,
171
172
createLinkInHead : true ,
172
- addUncaughtPages : true
173
- }
173
+ addUncaughtPages : true ,
174
+ } ,
174
175
} ,
175
176
`gatsby-plugin-catch-links` ,
176
177
`gatsby-plugin-react-helmet` ,
177
178
`gatsby-plugin-force-trailing-slashes` ,
178
179
{
179
180
resolve : `gatsby-plugin-postcss` ,
180
181
options : {
181
- postCssPlugins : [ require ( `cssnano` ) ( ) ]
182
- }
182
+ postCssPlugins : [ require ( `cssnano` ) ( ) ] ,
183
+ } ,
183
184
} ,
184
185
{
185
186
resolve : `@draftbox-co/gatsby-plugin-amp` ,
@@ -191,15 +192,16 @@ module.exports = themeOptions => {
191
192
relAmpHtmlPattern : `{{canonicalBaseUrl}}{{pathname}}{{pathIdentifier}}` ,
192
193
useAmpClientIdApi : true ,
193
194
dirName : __dirname ,
194
- themePath : `src/amp-styles/post.amp.css`
195
- }
195
+ themePath : `src/amp-styles/post.amp.css` ,
196
+ } ,
196
197
} ,
197
198
{
198
199
resolve : `gatsby-plugin-remove-generator` ,
199
200
options : {
200
201
content : `Draftbox` ,
201
202
} ,
202
203
} ,
203
- ]
204
+ `gatsby-plugin-remove-serviceworker` ,
205
+ ] ,
204
206
} ;
205
207
} ;
0 commit comments