-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
143 lines (143 loc) · 4.39 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
module.exports = {
siteMetadata: {
title: `BVP Church of Scotland`,
description: `Balshagray Victoria Park`,
siteUrl: `https://bvp.org.uk/`,
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `uploads`,
path: `${__dirname}/static/uploads`,
ignore: [`**/*\.pdf`], // ignore files ending in .pdf
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `markdown-pages`,
path: `${__dirname}/content`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-relative-images`,
},
{
resolve: `gatsby-remark-images`,
options: {
// It's important to specify the maxWidth (in pixels) of
// the content container as this plugin uses this as the
// base for generating different widths of each image.
maxWidth: 1600,
},
},
],
},
},
`gatsby-plugin-netlify-cms`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `balshagray-victoria-park`,
short_name: `bvp`,
start_url: `/`,
background_color: `#003057`,
theme_color: `#003057`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
},
},
`gatsby-plugin-catch-links`,
`gatsby-plugin-sass`,
`gatsby-plugin-typescript`,
{
resolve: `gatsby-plugin-feed`,
options: {
query: `
{
site {
siteMetadata {
title
description
siteUrl
site_url: siteUrl
}
}
}
`,
setup: options => ({
...options,
custom_namespaces: {
itunes: 'http://www.itunes.com/dtds/podcast-1.0.dtd',
googleplay: 'http://www.google.com/schemas/play-podcasts/1.0'
},
custom_elements: [
{ 'googleplay:owner': 'ftwinston@gmail.com' },
{ 'itunes:email': 'ftwinston@gmail.com' },
{ 'googleplay:explicit': 'no' },
{ 'itunes:explicit': 'no' },
{ 'language': 'en-gb' }
],
}),
feeds: [
{
serialize: ({ query: { site, allMarkdownRemark } }) => {
return allMarkdownRemark.nodes.map(node => {
return Object.assign({}, node.frontmatter, {
title: new Date(node.frontmatter.date).toLocaleDateString('en-GB', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }),
description: `Recording of church service`,
date: node.frontmatter.date,
url: `${site.siteMetadata.siteUrl}/${node.frontmatter.mp3}`,
guid: node.frontmatter.mp3,
enclosure: {
url: `${site.siteMetadata.siteUrl}/${node.frontmatter.mp3}`,
}
})
})
},
query: `
{
allMarkdownRemark(
filter: { fileAbsolutePath: { regex:"/.*/recordings/.*/" } },
sort: { fields: [frontmatter___date], order: DESC },
limit: 6
) {
nodes {
frontmatter{
title: date(formatString: "dddd, Do MMMM YYYY")
date
mp3
}
}
}
}
`,
output: "/rss.xml",
title: "Balshagray Victoria Park church",
description: "Morning worship services at BVP Church of Scotland",
site_url: "https://bvp.org.uk",
image_url: "https://bvp.org.uk/static/e3b362a3f948fcac3b137939f827f0b2/2244e/building-outside.jpg"
},
],
}
}
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}