Skip to content

Commit 46cdd02

Browse files
authored
Merge pull request #7176 from layer5io/copilot/fix-gatsby-build-issue
[gatsby-config] Fix RSS feed build failure - replace deprecated MDX html field with excerpt
2 parents 5ba06f3 + b30ee7e commit 46cdd02

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

gatsby-config.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ module.exports = {
115115
filter: { frontmatter: { published: { eq: true }${process.env.NODE_ENV === "development" ? ", date: { gte: \"2024-01-01\" }" : ""} } }
116116
) {
117117
nodes {
118-
html
118+
# Using excerpt instead of html because gatsby-plugin-mdx v5+ removed the html field
119+
excerpt
119120
frontmatter {
120121
title
121122
author
@@ -167,7 +168,7 @@ module.exports = {
167168
enclosure: node.frontmatter.thumbnail && {
168169
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
169170
},
170-
custom_elements: [{ "content:encoded": node.html }],
171+
custom_elements: [{ "content:encoded": node.excerpt }],
171172
});
172173
});
173174
},
@@ -192,7 +193,7 @@ module.exports = {
192193
enclosure: node.frontmatter.thumbnail && {
193194
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
194195
},
195-
custom_elements: [{ "content:encoded": node.html }],
196+
custom_elements: [{ "content:encoded": node.excerpt }],
196197
});
197198
});
198199
},
@@ -217,7 +218,7 @@ module.exports = {
217218
enclosure: node.frontmatter.thumbnail && {
218219
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
219220
},
220-
custom_elements: [{ "content:encoded": node.html }],
221+
custom_elements: [{ "content:encoded": node.excerpt }],
221222
});
222223
});
223224
},
@@ -242,7 +243,7 @@ module.exports = {
242243
enclosure: node.frontmatter.thumbnail && {
243244
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
244245
},
245-
custom_elements: [{ "content:encoded": node.html }],
246+
custom_elements: [{ "content:encoded": node.excerpt }],
246247
});
247248
});
248249
},
@@ -276,7 +277,7 @@ module.exports = {
276277
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
277278
},
278279
custom_elements: [
279-
{ "content:encoded": node.html },
280+
{ "content:encoded": node.excerpt },
280281
{ "content:type": node.frontmatter.type },
281282
{ "content:category": node.frontmatter.category },
282283
{ "content:tags": node.frontmatter.tags?.join(", ") || "" },
@@ -305,7 +306,7 @@ module.exports = {
305306
enclosure: node.frontmatter.thumbnail && {
306307
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
307308
},
308-
custom_elements: [{ "content:encoded": node.html }],
309+
custom_elements: [{ "content:encoded": node.excerpt }],
309310
});
310311
});
311312
},
@@ -330,7 +331,7 @@ module.exports = {
330331
enclosure: node.frontmatter.thumbnail && {
331332
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
332333
},
333-
custom_elements: [{ "content:encoded": node.html }],
334+
custom_elements: [{ "content:encoded": node.excerpt }],
334335
});
335336
});
336337
},

src/sections/Learn/Workshop-grid/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ const WorkshopsPage = () => {
101101
<div className="workshop-grid-wrapper">
102102
<Row style={{
103103
flexWrap: "wrap"
104-
}}>
104+
}}
105+
>
105106
{data.allMdx.nodes.map(({ id, frontmatter, fields }) => (
106107
<Col {...content && ID === id ? { $xs: 12, $sm: 12, $lg: 12 } : { $xs: 12, $sm: 6, $lg: 4 } } key={id} className="workshop-grid-col">
107108
<div className="workshop-grid-card" ref={(el) => {

0 commit comments

Comments
 (0)