-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
110 lines (110 loc) · 2.83 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
module.exports = {
siteMetadata: {
title: 'Plone Gatsby Blog',
description: 'Blog made with Plone + Gatsby',
subTitle: 'Blog made with Plone + Gatsby',
siteUrl: `https://dadlo.github.io/plone-gatsby-blog/`,
},
pathPrefix: `/plone-gatsby-blog`,
plugins: [
{
resolve: 'gatsby-source-plone',
options: {
baseUrl: 'http://b856bc3a.ngrok.io/Plone/',
logLevel: 'DEBUG',
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/static`,
},
},
{
resolve: `gatsby-plugin-feed`,
options: {
query: `
{
site {
siteMetadata {
title
description
siteUrl
site_url: siteUrl
}
}
}
`,
feeds: [
{
serialize: ({ query: { site, allPloneNewsItem } }) => {
return allPloneNewsItem.edges.map(edge => {
return Object.assign({}, edge.node, {
title: edge.node.title,
description: edge.node.description,
date: edge.node.created,
url: site.siteMetadata.siteUrl + edge.node._path,
guid: site.siteMetadata.siteUrl + edge.node._path,
custom_elements: [{ "content:encoded": edge.node.text.react }],
})
})
},
query: `
{
allPloneNewsItem(sort: {order: DESC, fields: created}) {
edges {
node {
title
description
text {
react
}
_path
created
}
}
}
}
`,
output: "/rss.xml",
},
],
},
},
/*{
resolve: 'gatsby-plugin-favicon',
options: {
logo: `./src/images/icon.png`,
injectHTML: true,
icons: {
android: true,
appleIcon: true,
appleStartup: true,
coast: false,
favicons: true,
firefox: true,
twitter: false,
yandex: false,
windows: true
}
}
},*/
{
resolve: `gatsby-plugin-manifest`,
options: {
name: 'Plone Gatsby Blog',
short_name: 'plone_gatsby_blog',
start_url: '/plone-gatsby-blog',
background_color: '#ffffff',
theme_color: '#007eb6',
display: 'standalone',
icon: 'src/images/icon.png',
},
},
'gatsby-plugin-sitemap',
'gatsby-plugin-offline',
'gatsby-plugin-react-helmet',
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
],
};