This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
106 lines (105 loc) · 2.67 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
module.exports = {
siteMetadata: {
title: "junukim.dev",
description: "안녕하세요! 소설 읽는 것을 좋아하는 김준우입니다.",
siteUrl: "https://junukim.dev",
},
plugins: [
"gatsby-plugin-react-helmet",
"gatsby-plugin-typescript",
"gatsby-plugin-styled-components",
{
resolve: `gatsby-plugin-feed`,
options: {
query: `
{
site {
siteMetadata {
title
description
siteUrl
}
}
}
`,
feeds: [
{
setup: (locals) => {
return {
...locals,
...locals.query.site.siteMetadata,
site_url: "https://junukim.dev/",
feed_url: "https://junukim.dev/feed.xml",
};
},
serialize: ({ query: { site, allMarkdownRemark } }) => {
return allMarkdownRemark.edges.map((edge) => {
const articleUrl = `${site.siteMetadata.siteUrl}${edge.node.fields.slug}`;
return {
...edge.node.frontmatter,
url: articleUrl,
guid: articleUrl,
};
});
},
query: `
{
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] },
) {
edges {
node {
fields { slug }
frontmatter {
title
description
date
tags
}
}
}
}
}
`,
output: "/feed.xml",
},
],
},
},
{
resolve: "gatsby-source-filesystem",
options: {
path: `${__dirname}/src/pages`,
name: "pages",
},
},
{
resolve: "gatsby-transformer-remark",
options: {
plugins: [
`gatsby-remark-autolink-headers`,
{
resolve: "gatsby-remark-prismjs",
},
],
},
},
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
// {
// resolve: `gatsby-plugin-google-analytics`,
// options: {
// trackingId: "UA-102906433-1",
// respectDNT: true,
// exclude: ["/public/**", "/admin/**"]
// }
// },
// {
// resolve: "gatsby-plugin-netlify-cms",
// options: {
// modulePath: `${__dirname}/src/cms/cms.js`
// }
// },
// "gatsby-plugin-netlify"
],
};