File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1
1
node_modules
2
2
.cache
3
3
public
4
- .DS_Store
4
+ .DS_Store
5
+ .env
Original file line number Diff line number Diff line change @@ -9,6 +9,23 @@ const config = require(`./src/utils/siteConfig`);
9
9
* Further info 👉🏼 https://www.gatsbyjs.org/docs/gatsby-config/
10
10
*
11
11
*/
12
+ let ghostConfig ;
13
+
14
+ try {
15
+ ghostConfig = require ( `./.ghost` ) ;
16
+ } catch ( e ) {
17
+ ghostConfig = {
18
+ production : {
19
+ apiUrl : process . env . GHOST_API_URL ,
20
+ contentApiKey : process . env . GHOST_CONTENT_API_KEY ,
21
+ } ,
22
+ development : {
23
+ apiUrl : process . env . GHOST_API_URL ,
24
+ contentApiKey : process . env . GHOST_CONTENT_API_KEY ,
25
+ } ,
26
+ } ;
27
+ }
28
+
12
29
module . exports = {
13
30
pathPrefix : "/" ,
14
31
siteMetadata : {
@@ -22,6 +39,13 @@ module.exports = {
22
39
// PRESERVE_FILE_DOWNLOAD_CACHE: true,
23
40
} ,
24
41
plugins : [
42
+ {
43
+ resolve : `gatsby-source-ghost` ,
44
+ options :
45
+ process . env . NODE_ENV === `development`
46
+ ? ghostConfig . development
47
+ : ghostConfig . production ,
48
+ } ,
25
49
{
26
50
resolve : `gatsby-plugin-google-gtag` ,
27
51
options : {
You can’t perform that action at this time.
0 commit comments