-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
131 lines (130 loc) · 3.51 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
require('dotenv').config();
const marked = require('marked');
module.exports = {
siteMetadata: {
title: `Kyriakos Chatzidimitriou`,
description: `Personal Website of Kyriakos Chatzidimitriou`,
siteUrl: `http://kyrcha.info`
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-sitemap`,
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: "gatsby-remark-embed-gist",
options: {
// Optional:
// the github handler whose gists are to be accessed
username: 'kyrcha',
// a flag indicating whether the github default gist css should be included or not
// default: true
includeDefaultCss: true
}
},
{
resolve: `@raae/gatsby-remark-oembed`
},
{
resolve: `gatsby-remark-katex`,
options: {
// Add any KaTeX options from https://github.com/KaTeX/KaTeX/blob/master/docs/options.md here
strict: `ignore`
}
},
`gatsby-remark-responsive-iframe`
// `gatsby-remark-wrap-iframe`
],
},
},
`gatsby-plugin-twitter`,
`gatsby-plugin-sass`,
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `src/utils/typography.js`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/pages/resources`,
name: "markdown-pages",
},
},
{
resolve: `gatsby-source-contentful`,
options: {
spaceId: process.env.CONTENTFUL_SPACE_ID,
accessToken: process.env.CONTENTFUL_ACCESS_TOKEN
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: process.env.GOOGLE_ANALYTICS,
},
},
`gatsby-plugin-netlify`,
{
resolve: `gatsby-plugin-feed`,
options: {
query: `
{
site {
siteMetadata {
title
description
siteUrl
site_url: siteUrl
}
}
}
`,
feeds: [
{
serialize: ({ query: { site, allContentfulBlogPost } }) => {
return allContentfulBlogPost.edges.map(edge => {
return Object.assign({}, edge.node, {
description: edge.node.excert,
date: edge.node.published,
url: site.siteMetadata.siteUrl + '/' + edge.node.url,
guid: site.siteMetadata.siteUrl + edge.node.url,
custom_elements: [{ "content:encoded": marked(edge.node.body.body) }],
});
});
},
query: `
{
allContentfulBlogPost(
limit: 1000,
sort: { order: DESC, fields: [published] }
) {
edges {
node {
id
title
published
tags
category
excert
url
body {
id
body
}
}
}
}
}
`,
output: "/rss.xml",
title: "kyrcha.info",
},
],
},
},
],
}