-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
executable file
·156 lines (154 loc) · 4.44 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
const path = require('path');
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
});
const { normalizer } = require('./utils/normalizer.js');
module.exports = {
siteMetadata: {
title: 'Cascading News',
author: 'Vincent Ballut',
siteUrl: 'https://www.cascading-news.com',
social: {
twitter: 'https://twitter.com/cascadingnews',
github: 'https://github.com/kaayru/cascadingnews-gatsby',
rss: 'https://admin.cascading-news.com/feed',
},
menuLinks: [
{
name: 'home',
link: '/',
},
{
name: 'about',
link: '/about',
},
{
name: 'weekly newsletter',
link: '/mailing-list',
},
],
},
plugins: [
/*
* Gatsby's data processing layer begins with “source”
* plugins. Here the site sources its data from Wordpress.
*/
{
resolve: 'gatsby-source-wordpress',
options: {
/*
* The base URL of the Wordpress site without the trailingslash and the protocol. This is required.
* Example : 'gatsbyjsexamplewordpress.wordpress.com' or 'www.example-site.com'
*/
baseUrl: process.env.GATSBY_WP_URL,
// The protocol. This can be http or https.
protocol: process.env.GATSBY_WP_PROTOCOL,
// Indicates whether the site is hosted on wordpress.com.
// If false, then the assumption is made that the site is self hosted.
// If true, then the plugin will source its content on wordpress.com using the JSON REST API V2.
// If your site is hosted on wordpress.org, then set this to false.
hostingWPCOM: false,
// If useACF is true, then the source plugin will try to import the Wordpress ACF Plugin contents.
// This feature is untested for sites hosted on wordpress.com.
// Defaults to true.
useACF: false,
verboseOutput: false,
// Set how many pages are retrieved per API request.
perPage: 20,
// Search and Replace Urls across WordPress content.
// searchAndReplaceContentUrls: {
// sourceUrl: `${process.env.GATSBY_WP_PROTOCOL}://${process.env.GATSBY_WP_URL}`,
// replacementUrl: process.env.GATSBY_REPLACEMENT_URL,
// },
// Set how many simultaneous requests are sent at once.
concurrentRequests: 10,
includedRoutes: [
// '**/categories',
'**/posts',
'**/pages',
// "**/media",
'**/tags',
'**/taxonomies',
// '**/users',
],
normalizer,
},
},
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: 'UA-43520247-1',
respectDNT: true,
},
},
'gatsby-plugin-react-helmet',
'gatsby-plugin-typescript',
{
resolve: 'gatsby-plugin-typography',
options: {
pathToConfigModule: 'src/utils/typography',
},
},
'gatsby-plugin-eslint',
{
resolve: 'gatsby-plugin-root-import',
options: {
src: path.join(__dirname, 'src'),
fixtures: path.join(__dirname, '__fixtures__'),
mocks: path.join(__dirname, '__mocks__'),
utils: path.join(__dirname, 'utils'),
},
},
'gatsby-plugin-styled-components',
{
resolve: 'gatsby-plugin-sitemap',
options: {
exclude: ['/sample-page', '/tag-page', '/home', '/weekly-newsletter'],
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'Cascading News',
short_name: 'CN',
start_url: '/',
background_color: '#f7f7f7',
theme_color: '#ff483b',
display: 'standalone',
icons: [
{
src: '/favicon-app-192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/favicon-app-256.png',
sizes: '256x256',
type: 'image/png',
},
{
src: '/favicon-app-512.png',
sizes: '512x512',
type: 'image/png',
},
],
crossOrigin: 'use-credentials',
},
},
{
resolve: 'gatsby-plugin-react-svg',
options: {
rule: {
include: /assets/,
},
},
},
{
resolve: 'gatsby-plugin-mailchimp',
options: {
endpoint:
'https://cascading-news.us19.list-manage.com/subscribe/post?u=c1ab33a63729c222c2676ad0b&id=647c8d2bcb',
},
},
],
};