/
gatsby-config.js
119 lines (116 loc) 路 3.24 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
let MA_metadata = {
title: "Maintainers Anonymous",
author: "Henry Zhu",
description: "A podcast about sharing our lives as people, as maintainers.",
gitOrg: "hzoo",
gitRepo: "hopeinsource.com",
siteUrl: "https://maintainersanonymous.com",
social: {
twitter: "@left_pad",
},
feed: {
rss: "https://feeds.transistor.fm/maintainers-anonymous",
google:
"https://podcasts.google.com/?feed=aHR0cHM6Ly9mZWVkcy50cmFuc2lzdG9yLmZtL21haW50YWluZXJzLWFub255bW91cw%3D%3D",
apple:
"https://itunes.apple.com/us/podcast/maintainers-anonymous/id1459347058",
spotify: "https://open.spotify.com/show/1rvrUipEYmYOt2EZoL0uWm",
},
};
let HIS_metadata = {
title: "Hope in Source",
author: "Nadia Eghbal & Henry Zhu",
description:
"What are the parallels between faith and open source software? Join Nadia and Henry for an off-the-cuff conversation between friends.",
gitOrg: "hzoo",
gitRepo: "hopeinsource.com",
siteUrl: "https://hopeinsource.com",
social: {
twitter: "@left_pad",
},
feed: {
rss: "https://feeds.transistor.fm/hope-in-source",
google:
"https://www.google.com/podcasts?feed=aHR0cHM6Ly9yc3Muc2ltcGxlY2FzdC5jb20vcG9kY2FzdHMvNzA0OS9yc3M%3D",
apple: "https://itunes.apple.com/us/podcast/hope-in-source/id1437677655",
spotify: "https://open.spotify.com/show/5EXwiyKzPrrucncKyrHy0B",
},
};
let MA = process.env.MA;
module.exports = {
siteMetadata: MA ? MA_metadata : HIS_metadata,
pathPrefix: "/",
plugins: [
MA && {
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/season-2`,
name: "episodes",
},
},
!MA && {
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/season-1`,
name: "episodes",
},
},
!MA && {
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/season-2`,
name: "episodes",
},
},
!MA && {
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/season-3`,
name: "episodes",
},
},
!MA && {
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/season-4`,
name: "episodes",
},
},
{
resolve: `gatsby-plugin-mdx`,
options: {
extensions: [`.mdx`, `.md`],
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 590,
},
},
{
resolve: "gatsby-remark-autolink-headers",
options: {
offsetY: "20",
},
},
"gatsby-remark-copy-linked-files",
{
resolve: require.resolve(
"./plugins/gatsby-remark-podcast-timestamp"
),
},
],
plugins: [`gatsby-remark-autolink-headers`],
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-react-helmet`,
{
resolve: "gatsby-plugin-typography",
options: {
pathToConfigModule: "src/utils/typography",
},
},
].filter(Boolean),
};