forked from chromaui/learnstorybook.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
54 lines (53 loc) · 1.65 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
const isDeployPreview = process.env.CONTEXT === 'deploy-preview';
const permalink = isDeployPreview ? process.env.DEPLOY_PRIME_URL : 'https://learnstorybook.com';
module.exports = {
siteMetadata: {
title: 'Storybook Tutorials',
description:
'Learn Storybook teaches frontend developers how to create UIs with components and design systems. Our free in-depth guides are created by Storybook maintainers and peer-reviewed by the open source community.',
permalink,
siteUrl: permalink,
githubUrl: 'https://github.com/chromaui/learnstorybook.com',
contributeUrl: 'https://github.com/chromaui/learnstorybook.com/#contribute',
},
plugins: [
{
resolve: 'gatsby-plugin-layout',
options: {
component: require.resolve(`./src/components/composite/AppLayout.js`),
},
},
'gatsby-plugin-react-helmet',
{
resolve: `gatsby-source-filesystem`,
options: {
name: `content`,
path: `${__dirname}/content/`,
},
},
`gatsby-transformer-remark`,
`gatsby-plugin-styled-components`,
`gatsby-plugin-sitemap`,
...(process.env.GOOGLE_ANALYTICS_TRACKING_ID && !isDeployPreview
? [
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: process.env.GOOGLE_ANALYTICS_TRACKING_ID,
head: true,
},
},
]
: []),
...(process.env.FACEBOOK_PIXEL_ID && !isDeployPreview
? [
{
resolve: 'gatsby-plugin-facebook-pixel',
options: {
pixelId: process.env.FACEBOOK_PIXEL_ID,
},
},
]
: []),
],
};