Skip to content

Commit fda9b5e

Browse files
committed
Use netlify env variables for production
1 parent 18459f3 commit fda9b5e

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Diff for: .ghost.json

-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@
22
"development": {
33
"apiUrl": "http://localhost:2368",
44
"contentApiKey": "729086654d48e6bf0af2b7cb4b"
5-
},
6-
"production": {
7-
"apiUrl": "https://josebrowne.tunnel.datahub.at",
8-
"contentApiKey": "729086654d48e6bf0af2b7cb4b"
95
}
106
}

Diff for: gatsby-config.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ let ghostConfig;
88
try {
99
ghostConfig = require(`./.ghost`);
1010
} catch (e) {
11-
ghostConfig = {
12-
production: {
13-
apiUrl: process.env.GHOST_API_URL,
14-
contentApiKey: process.env.GHOST_CONTENT_API_KEY,
15-
},
16-
};
11+
console.log(`No .ghost config found`);
1712
} finally {
13+
ghostConfig.production = {
14+
apiUrl: process.env.GHOST_API_URL,
15+
contentApiKey: process.env.GHOST_CONTENT_API_KEY,
16+
};
17+
1818
const { apiUrl, contentApiKey } =
1919
process.env.NODE_ENV === `development`
2020
? ghostConfig.development

0 commit comments

Comments
 (0)