-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
142 lines (139 loc) · 3.5 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.org/docs/gatsby-config/
*/
// Disable search engine crawls on deploy previews
const {
NODE_ENV,
URL: NETLIFY_SITE_URL = "https://www.example.com",
DEPLOY_PRIME_URL: NETLIFY_DEPLOY_URL = NETLIFY_SITE_URL,
CONTEXT: NETLIFY_ENV = NODE_ENV,
} = process.env
const isNetlifyProduction = NETLIFY_ENV === "production"
const siteUrl = isNetlifyProduction ? NETLIFY_SITE_URL : NETLIFY_DEPLOY_URL
module.exports = {
/* Your site config here */
plugins: [
`gatsby-plugin-netlify-cms`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/blog`,
name: `markdown-pages`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/static/assets`,
name: `assets`,
},
},
`gatsby-transformer-json`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/entries`,
name: `entries`,
},
},
{
resolve: "gatsby-plugin-react-leaflet",
options: {
linkStyles: true, // (default: true) Enable/disable loading stylesheets via CDN
},
},
{
resolve: `gatsby-plugin-mdx`,
options: {
extensions: [".mdx", ".md"],
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 590,
},
},
{
resolve: `gatsby-remark-responsive-iframe`,
options: {
wrapperStyle: `margin-bottom: 1.0725rem`,
},
},
],
},
},
{
resolve: "gatsby-plugin-robots-txt",
options: {
resolveEnv: () => NETLIFY_ENV,
env: {
production: {
policy: [{ userAgent: "*" }],
},
"branch-deploy": {
policy: [{ userAgent: "*", disallow: ["/"] }],
sitemap: null,
host: null,
},
"deploy-preview": {
policy: [{ userAgent: "*", disallow: ["/"] }],
sitemap: null,
host: null,
},
},
},
},
{
resolve: `gatsby-plugin-google-fonts`,
options: {
fonts: [
`Recursive\:300,400,500,600,700`,
`Expletus Sans\:400,500,600,700,400i,500i,600i,700i`,
],
display: "swap",
},
},
// `gatsby-transformer-remark`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-sitemap`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-google-gtag`,
options: {
// You can add multiple tracking ids and a pageview event will be fired for all of them.
trackingIds: [
"G-GXZ1DG394M", // Google Analytics / GA
"AW-CONVERSION_ID", // Google Ads / Adwords / AW
"DC-FLOODIGHT_ID", // Marketing Platform advertising products (Display & Video 360, Search Ads 360, and Campaign Manager)
],
},
gtagConfig: {
optimize_id: "OPT_CONTAINER_ID",
anonymize_ip: true,
cookie_expires: 0,
},
// This object is used for configuration specific to this plugin
pluginConfig: {
// Puts tracking script in the head instead of the body
head: false,
// Setting this parameter is also optional
respectDNT: true,
// Avoids sending pageview hits from custom paths
exclude: ["/preview/**", "/do-not-track/me/too/"],
},
},
],
siteMetadata: {
title: `GeoBeerMap`,
subtitle: `Find craft beer in Georgia`,
titleTemplate: "%s · Georgian Craft Beer",
author: "Andrew Braun",
description: `Find craft beer in the country of Georgia! All the best breweries, bars, and retailers in Tbilisi, Batumi, and beyond.`,
url: "https://geobeermap.com",
image: "/images/logo/square-logo.png",
siteUrl: `https://geobeermap.com`,
},
}