-
Notifications
You must be signed in to change notification settings - Fork 3
/
gatsby-config.js
63 lines (60 loc) · 1.85 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
require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})
//configure your agility plugin with environment variables so that
//your agility api credentials stay secure
const agilityConfig = {
guid: process.env.AGILITY_GUID,
apiKey: process.env.AGILITY_API_KEY,
isPreview: process.env.AGILITY_API_ISPREVIEW === "true",
}
/**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.org/docs/gatsby-config/
*/
module.exports = {
siteMetadata: {
title: "Agility CMS Gatsby Starter",
},
plugins: [
`gatsby-plugin-netlify`,
`gatsby-plugin-image`,
`gatsby-plugin-react-helmet`,
{
//the name of the plugin
resolve: "@agility/gatsby-source-agilitycms",
//the options for our plugin
options: {
//your Agility Content Fetch API Guid
guid: agilityConfig.guid,
//your Agility Content Fetch API Key
apiKey: agilityConfig.apiKey,
//set this to true if you are using the preview API Key
isPreview: agilityConfig.isPreview,
//set this to true to see expanded traces in the build logs
debug: false,
//the languages you want to source content for
languages: [
{
// The name of the language code
name: "English",
// The actual language code set in Agility CMS
code: "en-us",
// The name to be used in the URL path that represents the current language
path: "en",
},
],
// The channels you want to include
channels: [
{
// The reference name for the website channel as it is defined in Agility CMS
referenceName: "website",
},
],
//the page template that will be used to render Agility CMS pages
masterPageTemplate: "./src/AgilityPage.jsx",
},
}
],
}